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
Follow the guide [here](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app).
17
17
18
-
The sample retrieves user's group membership using Azure AD graph API which requires the registered app to have `Directory.AccessAsUser.All` "Access the directory as the signed-in user" under `Delegated Permissions`. You need AAD admin privilege to be able to grant the permission in API ACCESS -> Required permission. You can follow the below steps:
19
-
20
-
* In the list of pages for the app, select **API permissions**
21
-
- Click the **Add a permission** button and then,
22
-
- Ensure that the **Microsoft APIs** tab is selected
23
-
- In the *Commonly used Microsoft APIs* section, click on **Microsoft Graph**
24
-
- In the **Delegated permissions** section, ensure that the right permissions are checked: **Directory.AccessAsUser.All**
25
-
- Select the **Add permissions** button
26
18
### Configure groups for sign in user
27
19
28
20
In order to try the authorization action with this sample with minimum effort, [configure the user and groups in Azure Active Directory](https://docs.microsoft.com/azure/active-directory/active-directory-groups-create-azure-portal), configure the user with `group1`.
@@ -34,8 +26,8 @@ In order to try the authorization action with this sample with minimum effort, [
Copy file name to clipboardExpand all lines: sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-backend/README.md
+2-12Lines changed: 2 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,16 +9,6 @@ This sample illustrates how to use `azure-spring-boot-starter-active-directory`
9
9
10
10
Follow the guide [here](https://docs.microsoft.com/azure/active-directory/develop/active-directory-protocols-oauth-code#register-your-application-with-your-ad-tenant).
11
11
12
-
The sample retrieves user's group membership using Azure AD graph API which requires the registered app to have `Directory.AccessAsUser.All` "Access the directory as the signed-in user" under `Delegated Permissions`. You need AAD admin privilege to be able to grant the permission in API ACCESS -> Required permission.
13
-
You can follow the below steps:
14
-
15
-
* In the list of pages for the app, select **API permissions**
16
-
- Click the **Add a permission** button
17
-
- Ensure that the **Microsoft APIs** tab is selected
18
-
- In the *Supported legacy APIs* section, click on **Azure Active Directory Graph**
19
-
- In the **Delegated permissions** section, ensure that the right permissions are checked: **Directory.AccessAsUser.All**
By default, azure-spring-boot is set up to utilize the Azure AD Graph. If you would prefer, it can be set up to utilize the Microsoft Graph instead. In order to do this, you will need to update the app registration in Azure to grant the application permissions to the Microsoft Graph API and add some properties to the application.properties file.
187
+
By default, azure-spring-boot is set up to utilize the Microsoft Graph. If you would prefer, it can be set up to utilize the Azure AD Graph instead. In order to do this, you will need to update the app registration in Azure to grant the application permissions to the Azure AD Graph API and add some properties to the application.properties file.
188
188
189
-
***Grant permissions to the application**: After application registration succeeded, go to API permissions - Add a permission, select `Microsoft Graph`, select Delegated permissions, tick `Directory.AccessAsUser.All - Access the directory as the signed-in user` and `Use.Read - Sign in and read user profile`. Click `Add Permissions` (Note: you will need administrator privilege to grant permission). Furthermore, you can remove the API permissions to the Azure Active Directory Graph, as these will not be needed.
189
+
***Grant permissions to the application**: After application registration succeeded, go to API permissions - Add a permission, select `Azure Active Directory Graph`, select Delegated permissions, tick `Directory.AccessAsUser.All - Access the directory as the signed-in user` and `Use.Read - Sign in and read user profile`. Click `Add Permissions` (Note: you will need administrator privilege to grant permission). Furthermore, you can remove the API permissions to the Microsoft Graph, as these will not be needed.
If you're using [Azure China](https://docs.microsoft.com/azure/china/china-welcome), please set the environment property in the `application.properties` file to:
@@ -208,7 +210,7 @@ Please refer to [azure-spring-boot-sample-active-directory-backend-v2](https://g
208
210
209
211
By default, `azure-spring-boot-starter-active-directory` configures scopes of `openid`, `profile` and `https://graph.microsoft.com/user.read` to implement OpenID Connect protocol and access of Microsoft Graph API. For customization of scope, developers need to configure in the `application.properties`:
0 commit comments