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: articles/active-directory/develop/application-model.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,9 +28,9 @@ For an identity provider to know that a user has access to a particular app, bot
28
28
* Decide if you want to allow users to sign in only if they belong to your organization. This architecture is known as a single-tenant application. Or, you can allow users to sign in by using any work or school account, which is known as a multi-tenant application. You can also allow personal Microsoft accounts or a social account from LinkedIn, Google, and so on.
29
29
* Request scope permissions. For example, you can request the "user.read" scope, which grants permission to read the profile of the signed-in user.
30
30
* Define scopes that define access to your web API. Typically, when an app wants to access your API, it will need to request permissions to the scopes you define.
31
-
* Share a secret with the Microsoft identity platform that proves the app's identity. Using a secret is relevant in the case where the app is a confidential client application. A confidential client application is an application that can hold credentials securely. A trusted back-end server is required to store the credentials.
31
+
* Share a secret with the Microsoft identity platform that proves the app's identity. Using a secret is relevant in the case where the app is a confidential client application. A confidential [client application](developer-glossary.md#client-application) is an application that can hold credentials securely, like a [web client](developer-glossary.md#web-client). A trusted back-end server is required to store the credentials.
32
32
33
-
After the app is registered, it's given a unique identifier that it shares with the Microsoft identity platform when it requests tokens. If the app is a [confidential client application](developer-glossary.md#client-application), it will also share the secret or the public key depending on whether certificates or secrets were used.
33
+
After the app is registered, it's given a unique identifier that it shares with the Microsoft identity platform when it requests tokens. If the app is a confidential client application, it will also share the secret or the public key depending on whether certificates or secrets were used.
34
34
35
35
The Microsoft identity platform represents applications by using a model that fulfills two main functions:
36
36
@@ -44,14 +44,14 @@ The Microsoft identity platform:
44
44
* Provides infrastructure for implementing app provisioning within the app developer's tenant, and to any other Azure AD tenant.
45
45
* Handles user consent during token request time and facilitates the dynamic provisioning of apps across tenants.
46
46
47
-
*Consent* is the process of a resource owner granting authorization for a client application to access protected resources, under specific permissions, on behalf of the resource owner. The Microsoft identity platform enables:
47
+
[*Consent*](developer-glossary.md#consent) is the process of a resource owner granting authorization for a client application to access protected resources, under specific permissions, on behalf of the resource owner. The Microsoft identity platform enables:
48
48
49
49
* Users and administrators to dynamically grant or deny consent for the app to access resources on their behalf.
50
50
* Administrators to ultimately decide what apps are allowed to do and which users can use specific apps, and how the directory resources are accessed.
51
51
52
52
## Multi-tenant apps
53
53
54
-
In the Microsoft identity platform, an [application object](developer-glossary.md#application-object) describes an application. At deployment time, the Microsoft identity platform uses the application object as a blueprint to create a [service principal](developer-glossary.md#service-principal-object), which represents a concrete instance of an application within a directory or tenant. The service principal defines what the app can actually do in a specific target directory, who can use it, what resources it has access to, and so on. The Microsoft identity platform creates a service principal from an application object through [consent](developer-glossary.md#consent).
54
+
In the Microsoft identity platform, an [application object](developer-glossary.md#application-object) describes an application. At deployment time, the Microsoft identity platform uses the application object as a blueprint to create a [service principal](developer-glossary.md#service-principal-object), which represents a concrete instance of an application within a directory or tenant. The service principal defines what the app can actually do in a specific target directory, who can use it, what resources it has access to, and so on. The Microsoft identity platform creates a service principal from an application object through consent.
55
55
56
56
The following diagram shows a simplified Microsoft identity platform provisioning flow driven by consent. It shows two tenants: *A* and *B*.
Copy file name to clipboardExpand all lines: articles/active-directory/develop/reference-aadsts-error-codes.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,6 +165,7 @@ The `error` field has several possible values - review the protocol documentatio
165
165
| AADSTS50143 | Session mismatch - Session is invalid because user tenant doesn't match the domain hint due to different resource. [Open a support ticket](../fundamentals/active-directory-troubleshooting-support-howto.md) with Correlation ID, Request ID, and Error code to get more details. |
166
166
| AADSTS50144 | InvalidPasswordExpiredOnPremPassword - User's Active Directory password has expired. Generate a new password for the user or have the user use the self-service reset tool to reset their password. |
167
167
| AADSTS50146 | MissingCustomSigningKey - This app is required to be configured with an app-specific signing key. It is either not configured with one, or the key has expired or isn't yet valid. Please contact the owner of the application. |
168
+
| AADSTS501461 | AcceptMappedClaims is only supported for a token audience matching the application GUID or an audience within the tenant's verified domains. Either change the resource identifier, or use an application-specific signing key. |
168
169
| AADSTS50147 | MissingCodeChallenge - The size of the code challenge parameter isn't valid. |
169
170
| AADSTS501481 | The Code_Verifier doesn't match the code_challenge supplied in the authorization request.|
170
171
| AADSTS501491 | InvalidCodeChallengeMethodInvalidSize - Invalid size of Code_Challenge parameter.|
@@ -183,7 +184,7 @@ The `error` field has several possible values - review the protocol documentatio
183
184
| AADSTS50194 | Application '{appId}'({appName}) isn't configured as a multi-tenant application. Usage of the /common endpoint isn't supported for such applications created after '{time}'. Use a tenant-specific endpoint or configure the application to be multi-tenant. |
184
185
| AADSTS50196 | LoopDetected - A client loop has been detected. Check the app’s logic to ensure that token caching is implemented, and that error conditions are handled correctly. The app has made too many of the same request in too short a period, indicating that it is in a faulty state or is abusively requesting tokens. |
185
186
| AADSTS50197 | ConflictingIdentities - The user could not be found. Try signing in again. |
186
-
| AADSTS50199 | CmsiInterrupt - For security reasons, user confirmation is required for this request. Because this is an "interaction_required" error, the client should do interactive auth. This occurs because a system webview has been used to request a token for a native application - the user must be prompted to ask if this was actually the app they meant to sign into. To avoid this prompt, the redirect URI should be part of the following safe list: <br />http://<br />https://<br />chrome-extension:// (desktop Chrome browser only) |
187
+
| AADSTS50199 | CmsiInterrupt - For security reasons, user confirmation is required for this request. Interrupt is shown for all scheme redirects in mobile browsers. <br />No action required. The user was asked to confirm that this app is the application they intended to sign into. <br />This is a security feature that helps prevent spoofing attacks. This occurs because a system webview has been used to request a token for a native application. <br />To avoid this prompt, the redirect URI should be part of the following safe list: <br />http://<br />https://<br />chrome-extension:// (desktop Chrome browser only) |
187
188
| AADSTS51000 | RequiredFeatureNotEnabled - The feature is disabled. |
188
189
| AADSTS51001 | DomainHintMustbePresent - Domain hint must be present with on-premises security identifier or on-premises UPN. |
189
190
| AADSTS1000104| XCB2BResourceCloudNotAllowedOnIdentityTenant - Resource cloud {resourceCloud} isn't allowed on identity tenant {identityTenant}. {resourceCloud} - cloud instance which owns the resource. {identityTenant} - is the tenant where signing-in identity is originated from. |
Copy file name to clipboardExpand all lines: articles/active-directory/develop/scenario-daemon-acquire-token.md
+76-36Lines changed: 76 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,11 +22,23 @@ After you've constructed a confidential client application, you can acquire a to
22
22
23
23
The scope to request for a client credential flow is the name of the resource followed by `/.default`. This notation tells Azure Active Directory (Azure AD) to use the *application-level permissions* declared statically during application registration. Also, these API permissions must be granted by a tenant administrator.
24
24
25
-
# [.NET](#tab/dotnet)
25
+
# [.NET](#tab/idweb)
26
26
27
-
```csharp
28
-
ResourceId="someAppIDURI";
29
-
varscopes=new [] { ResourceId+"/.default"};
27
+
Here's an example of defining the scopes for the web API as part of the configuration in an [*appsettings.json*](https://github.com/Azure-Samples/active-directory-dotnetcore-daemon-v2/blob/master/2-Call-OwnApi/daemon-console/appsettings.json) file. This example is taken from the [.NET Core console daemon](https://github.com/Azure-Samples/active-directory-dotnetcore-daemon-v2) code sample on GitHub.
28
+
29
+
```json
30
+
{
31
+
"AzureAd": {
32
+
// Same AzureAd section as before.
33
+
},
34
+
35
+
"MyWebApi": {
36
+
"BaseUrl": "https://localhost:44372/",
37
+
"RelativePath": "api/TodoList",
38
+
"RequestAppToken": true,
39
+
"Scopes": [ "[Enter here the scopes for your web API]" ]
40
+
}
41
+
}
30
42
```
31
43
32
44
# [Java](#tab/java)
@@ -53,6 +65,13 @@ In MSAL Python, the configuration file looks like this code snippet:
53
65
}
54
66
```
55
67
68
+
# [.NET (low level)](#tab/dotnet)
69
+
70
+
```csharp
71
+
ResourceId="someAppIDURI";
72
+
varscopes=new [] { ResourceId+"/.default"};
73
+
```
74
+
56
75
---
57
76
58
77
### Azure AD (v1.0) resources
@@ -65,42 +84,25 @@ The scope used for client credentials should always be the resource ID followed
65
84
66
85
## AcquireTokenForClient API
67
86
68
-
To acquire a token for the app, you'll use `AcquireTokenForClient` or its equivalent, depending on the platform.
87
+
To acquire a token for the app, use `AcquireTokenForClient` or its equivalent, depending on the platform.
69
88
70
-
# [.NET](#tab/dotnet)
89
+
# [.NET](#tab/idweb)
90
+
91
+
With Microsoft.Identity.Web, you don't need to acquire a token. You can use higher level APIs, as you see in [Calling a web API from a daemon application](scenario-daemon-call-api.md). If however you're using an SDK that requires a token, the following code snippet shows how to get this token.
71
92
72
93
```csharp
73
-
usingMicrosoft.Identity.Client;
94
+
usingMicrosoft.Extensions.DependencyInjection;
95
+
usingMicrosoft.Identity.Abstractions;
96
+
usingMicrosoft.Identity.Web;
74
97
75
-
// With client credentials flows, the scope is always of the shape "resource/.default" because the
76
-
// application permissions need to be set statically (in the portal or by PowerShell), and then granted by
### AcquireTokenForClient uses the application token cache
100
-
101
-
In MSAL.NET, `AcquireTokenForClient` uses the application token cache. (All the other AcquireToken*XX* methods use the user token cache.)
102
-
Don't call `AcquireTokenSilent` before you call `AcquireTokenForClient`, because `AcquireTokenSilent` uses the *user* token cache. `AcquireTokenForClient` checks the *application* token cache itself and updates it.
Don't call `AcquireTokenSilent` before you call `AcquireTokenForClient`, because `AcquireTokenSilent` uses the *user* token cache. `AcquireTokenForClient` checks the *application* token cache itself and updates it.
225
+
190
226
---
191
227
192
228
### Protocol
@@ -253,10 +289,10 @@ If your daemon app calls your own web API and you weren't able to add an app per
253
289
254
290
## Next steps
255
291
256
-
# [.NET](#tab/dotnet)
292
+
# [.NET](#tab/idweb)
257
293
258
294
Moveontothenextarticleinthisscenario,
259
-
[Calling a web API](./scenario-daemon-call-api.md?tabs=dotnet).
0 commit comments