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
@@ -12,30 +12,30 @@ This article explains how to configure bundled consent for Microsoft Entra ID ap
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 the both apps in Microsoft Entra ID. You configure bundle the 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 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:
16
16
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
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
19
-
- AADSTS650052: The app is trying to access a service\”{app_id}\”(\”app_name\”) that your organization %\”{organization}\” lacks a service principal for. Contact your IT Admin to review the configuration of your service subscriptions or consent to the application in order to create the required service principal
19
+
- AADSTS650052: The app is trying to access a service\”{app_id}\”(\”app_name\”) that your organization %\”{organization}\” lacks a service principal for. Contact your IT Admin to review the configuration of your service subscriptions or consent to the application in order to create the required service principal.
20
20
21
21
## Solution
22
22
23
-
## Step 1: Configure knownClientApplications for the API app registration
23
+
###Step 1: Configure knownClientApplications for the API app registration
24
24
25
25
Add the custom client app ID to the custom API app registration's `knownClientApplications` property. For more information, see [knownClientApplications attribute](/entra/identity-platform/reference-app-manifest#knownclientapplications-attribute).
26
26
27
-
## Step 2: Configure API permissions
27
+
###Step 2: Configure API permissions
28
28
29
29
Make sure that:
30
30
31
31
- All required API permissions are correctly configured on both the custom client and custom API app registrations.
32
32
- The custom client app registration includes the API permissions that are defined in the custom API app registration.
33
33
34
-
## Step 3: The sign-in request
34
+
###Step 3: The sign-in request
35
35
36
-
Your authentication request must use the `.default` scope for Microsoft Graph. For Microsoft accounts, the scope must be for the custom API.
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**
@@ -75,7 +75,7 @@ var loginResult = await clientApp.AcquireTokenInteractive(consentScope)
75
75
76
76
Consent propagation for new service principals and permissions may take time. Your application should handle this delay.
77
77
78
-
### Acquire Tokens for multiple resources
78
+
####Acquire tokens for multiple resources
79
79
80
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:
81
81
@@ -85,7 +85,7 @@ If your client app needs to acquire tokens for another resource such as Microsof
85
85
86
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.
@@ -148,7 +148,7 @@ Here is a sample code about retry logic:
148
148
}
149
149
```
150
150
151
-
### On the custom API using the On-behalf-of flow
151
+
####On the custom API using the On-behalf-of flow
152
152
153
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:
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.
201
201
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:
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
205
- For work or school accounts, typically only one consent prompt is required.
0 commit comments