You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/readme.md
+23-25Lines changed: 23 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@
4
4
5
5
-[Pre-requisites](#prereqs)
6
6
-[Configure Azure AD App Registration](#appreg)
7
-
-[Script](#script)
7
+
-[PowerShell 7](#pwsh)
8
+
-[Bash](#bash)
8
9
-[Manual](#manual)
9
10
-[Launch Sample](#launch)
10
11
@@ -18,35 +19,41 @@ We highly recommend that you use a Microsoft 365 Developer Tenant with content p
18
19
19
20
## <aid="appreg">Configure Azure AD App Registration</a>
20
21
21
-
There are two ways which you can configure the App Registration required for the samples to work correctly, through automatation using a bashscript or manually through Azure Portal.
22
+
There are two ways which you can configure the App Registration required for the samples to work correctly, through automatation using either a `bash` or `pwsh`script we provide for you in the `scripts` directory, or manually through Azure Portal.
22
23
23
-
### <aid="script">Script</a>
24
+
### <aid="pwsh">PowerShell 7</a>
24
25
25
-
If using PowerShell:
26
-
```powershell
27
-
.\scripts\setup.ps1
26
+
> The script uses CLI for Microsoft 365 to authenticate with and create the app registration in your tenant, therefore requires nodejs, v8 or greater to be installed
27
+
28
+
```sh
29
+
PS >cd ./samples/
30
+
PS > ./scripts/setup.ps1
28
31
```
29
32
30
-
If using a Linux/Mac terminal:
31
-
```shell
33
+
Follow the prompts in the terminal.
34
+
35
+
### <aid="bash">bash</a>
36
+
37
+
> The script uses CLI for Microsoft 365 to authenticate with and create the app registration in your tenant, therefore requires nodejs, v8 or greater to be installed
38
+
39
+
```sh
40
+
$ >cd ./samples/
32
41
$ > chmod +x /scripts/setup.sh
33
42
$ > ./scripts/setup.sh
34
43
```
35
44
36
45
Follow the prompts in the terminal.
37
46
38
-
> The script uses CLI for Microsoft 365 to authenticate with and create the app registration in your tenant, therefore requires nodejs, v8 or greater to be installed
39
-
40
-
## <aid="manual">Manual</a>
47
+
### <aid="manual">Manual</a>
41
48
42
49
The following table provides details of how to configure your app registration.
| API Permissions | Microsoft Graph <br> User.Read.All (Delegate) w/ Admin Consent <br> Presence.Read.All |
50
57
51
58
After creating the app registation, create a file called `env.js` in the root of the `samples` directory with the following contents, replacing `<clientid>` with the value which can be copied from the portal.
52
59
@@ -56,18 +63,9 @@ const appId = '<clientid>';
56
63
57
64
## <aid="launch">Launch Sample</a>
58
65
59
-
Follow these instructions to launch the samples using the Visual Studio Code [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) extension.
60
-
61
-
> !!! IMPORTANT !!!
62
-
> The default host name used by Live Server is `127.0.0.1`, therefore you will need to change the `liveServer.settings.host` setting to `localhost` for the samples to work correctly, as `127.0.0.1` is not a valid Redirect URI.
63
-
64
-
Open the `samples` directory in Visual Studio Code
0 commit comments