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
To run the app you will need an Azure subscription so that you can create an Entra Id App Registration. You can either do that manually in the Azure portal or by using the Azure CLI and the following steps.
22
28
23
-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
29
+
1. Install Azure CLI (if you haven't already): Follow the installation instructions for your operating system from the [official Azure CLI documentation](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli).
30
+
31
+
2. Sign in to Azure
32
+
33
+
```
34
+
az login --tenant "your-tenant-id"
35
+
```
24
36
25
-
Currently, two official plugins are available:
37
+
3. Create the app registration and note the "appId" (client Id) and "id" (object id) that is output in the json:
26
38
27
-
-[@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
28
-
-[@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
39
+
```
40
+
az ad app create --display-name "YourAppName" --sign-in-audience "AzureADMultipleOrgs"
41
+
```
29
42
30
-
## Expanding the ESLint configuration
43
+
4. Add a SPA redirect URI, replace <your-app-object-id> in the following command with the "id" from step 3:
31
44
32
-
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
45
+
```
46
+
az rest --method PATCH --uri 'https://graph.microsoft.com/v1.0/applications/<your-app-object-id>' --headers 'Content-Type=application/json' --body {"spa":{"redirectUris":["http://localhost:5173/"]}}'
47
+
```
33
48
34
-
- Configure the top-level `parserOptions` property like this:
49
+
5. Add Microsoft Graph API permissions, replace your-app-client-id in the following command with the "appId" from step 3:
az ad app permission add --id "your-app-client-id" --api 00000003-0000-0000-c000-000000000000 --api-permissions 311a71cc-e848-46a1-bdf8-97ff7156d8e6=Scope
46
53
```
47
54
48
-
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
55
+
6. Edit authConfig.ts and replace the clientId with the "appId" from step 3. You should now be able to run the app and login.
0 commit comments