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: support/entra/entra-id/app-integration/bundle-consent-application-registrations.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,11 @@ ms.custom: sap:Developing or Registering apps with Microsoft identity platform
8
8
---
9
9
# Bundle consent for Microsoft Entra ID applications
10
10
11
-
This article explains how to configure bundled consent for Microsoft Entra ID applications.
11
+
This article discusses how to configure bundled consent for Microsoft Entra ID applications.
12
12
13
13
## Symptoms
14
14
15
-
You have a custom client app and a custom API app, and you create app registrations for both apps in Microsoft Entra ID. You configure bundle consent for these two apps. In this scenario, you might receive one of the following errors when you try to sign into the app:
15
+
You have a custom client app and a custom API app, and you create app registrations for both apps in Microsoft Entra ID. You configure bundled consent for both apps. In this scenario, you might receive one of the following error messages when you try to sign in to either app:
16
16
17
17
- AADSTS70000: The request was denied because one or more scopes requested are unauthorized or expired. The user must first sign in and grant the client application access to the requested scope.
18
18
@@ -35,7 +35,7 @@ Make sure that:
35
35
36
36
Your authentication request must use the `.default` scope for Microsoft Graph. For Microsoft accounts, the scope must be for the custom API.
37
37
38
-
**Example Request for Microsoft accounts and Work or school accounts**
38
+
**Example Request for Microsoft accounts and work or school accounts**
@@ -73,19 +73,19 @@ var loginResult = await clientApp.AcquireTokenInteractive(consentScope)
73
73
.ExecuteAsync();
74
74
```
75
75
76
-
Consent propagation for new service principals and permissions may take time. Your application should handle this delay.
76
+
Consent propagation for new service principals and permissions can take some time to finish. Your application should successfully handle this delay.
77
77
78
78
#### Acquire tokens for multiple resources
79
79
80
-
If your client app needs to acquire tokens for another resource such as Microsoft Graph, you must implement logic to handle potential delays after users consent to application. Here are some recommendations:
80
+
If your client app has to acquire tokens for another resource, such as Microsoft Graph, you must implement logic to handle potential delays after users consent to the application. Here are some recommendations:
81
81
82
-
- Use the `.default` scope when requesting tokens.
82
+
- Use the `.default` scope when you request tokens.
83
83
- Track acquired scopes until the required one is returned.
84
84
- Add a delay if the result still does not have the required scope.
85
85
86
-
Currently, if `AcquireTokenSilent` fails, MSAL requires a successful interactive authentication before allowing another silent token acquisition. This restriction applies even if a valid refresh token is available.
86
+
Currently, if `AcquireTokenSilent` fails, MSAL requires a successful interactive authentication before it allows another silent token acquisition. This restriction applies even if a valid refresh token is available.
@@ -148,9 +148,9 @@ Here is a sample code about the retry logic:
148
148
}
149
149
```
150
150
151
-
#### On the custom API using the On-behalf-of flow
151
+
#### About the custom API that uses the On-behalf-of flow
152
152
153
-
Similar to the client app, when your custom API tries to acquire tokens for another resource using the On-Behalf-Of (OBO) flow, it may fail immediately after consent. To resolve this issue, you can implement retry logic and scope tracking as the following sample:
153
+
Similar to the client app, when your custom API tries to acquire tokens for another resource by using the On-Behalf-Of (OBO) flow, it might fail immediately after consent. To resolve this issue, you can implement retry logic and scope tracking, as in the following sample code:
Ideally, you should create a separate flow that guides users through the consent process, provisions your app and API in their tenant or Microsoft account, and completes consent in a single step that separate from signing in.
200
+
Ideally, you would create a separate flow that guides users through the consent process, provisions your app and API in their tenant or Microsoft account, and completes consent in a single step that's separate from signing in.
201
201
202
202
If you don't separate this flow and instead combine it with your app's sign-in experience, the process can become confusing. Users may encounter multiple consent prompts. To improve the experience, consider adding a message in your app that informs users they might be asked to consent more than once:
203
203
204
204
- For Microsoft accounts, expect at least two consent prompts: one for the client app and one for the API.
205
-
-For work or school accounts, typically only one consent prompt is required.
205
+
-Typically, for work or school accounts, only one consent prompt is required.
206
206
207
207
The following is an end-to-end code sample that demonstrates a smooth user experience. It supports all account types and prompts for consent only when necessary.
0 commit comments