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/authentication-flows-app-scenarios.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,31 +1,30 @@
1
1
---
2
-
title: Microsoft identity platform authentication flows & app scenarios
2
+
title: Microsoft identity platform app types and authentication flows
3
3
description: Learn about application scenarios for the Microsoft identity platform, including authenticating identities, acquiring tokens, and calling protected APIs.
#Customer intent: As an app developer, I want to learn about authentication flows and application scenarios so I can create applications protected by the Microsoft identity platform.
16
+
#Customer intent: As an app developer, I want to learn about authentication flows and application scenarios so I can create applications protected by the Microsoft identity platform.
18
17
---
19
18
20
-
# Authentication flows and application scenarios
19
+
# Microsoft identity platform app types and authentication flows
21
20
22
21
The Microsoft identity platform supports authentication for different kinds of modern application architectures. All of the architectures are based on the industry-standard protocols [OAuth 2.0 and OpenID Connect](./v2-protocols.md). By using the [authentication libraries for the Microsoft identity platform](reference-v2-libraries.md), applications authenticate identities and acquire tokens to access protected APIs.
23
22
24
23
This article describes authentication flows and the application scenarios that they're used in.
25
24
26
25
## Application categories
27
26
28
-
Tokens can be acquired from several types of applications, including:
27
+
[Security tokens](./security-tokens.md) can be acquired from several types of applications, including:
29
28
30
29
- Web apps
31
30
- Mobile apps
@@ -40,7 +39,7 @@ The following sections describe the categories of applications.
40
39
41
40
Authentication scenarios involve two activities:
42
41
43
-
-**Acquiring security tokens for a protected web API**: We recommend that you use the [Microsoft Authentication Library (MSAL)](reference-v2-libraries.md), developed and supported by Microsoft.
42
+
-**Acquiring security tokens for a protected web API**: We recommend that you use the [Microsoft Authentication Library (MSAL)](msal-overview.md), developed and supported by Microsoft.
44
43
-**Protecting a web API or a web app**: One challenge of protecting these resources is validating the security token. On some platforms, Microsoft offers [middleware libraries](reference-v2-libraries.md).
45
44
46
45
### With users or without users
@@ -75,7 +74,7 @@ The available authentication flows differ depending on the sign-in audience. Som
75
74
76
75
For more information, see [Supported account types](v2-supported-account-types.md#account-type-support-in-authentication-flows).
77
76
78
-
## Application scenarios
77
+
## Application types
79
78
80
79
The Microsoft identity platform supports authentication for these app architectures:
81
80
@@ -127,7 +126,7 @@ For a desktop app to call a web API that signs in users, use the interactive tok
127
126
128
127
There's another possibility for Windows-hosted applications on computers joined either to a Windows domain or by Azure Active Directory (Azure AD). These applications can silently acquire a token by using [integrated Windows authentication](https://aka.ms/msal-net-iwa).
129
128
130
-
Applications running on a device without a browser can still call an API on behalf of a user. To authenticate, the user must sign in on another device that has a web browser. This scenario requires that you use the [device code flow](https://aka.ms/msal-net-device-code-flow).
129
+
Applications running on a device without a browser can still call an API on behalf of a user. To authenticate, the user must sign in on another device that has a web browser. This scenario requires that you use the [device code flow](v2-oauth2-device-code.md).
@@ -147,7 +146,7 @@ Similar to a desktop app, a mobile app calls the interactive token-acquisition m
147
146
148
147
MSAL iOS and MSAL Android use the system web browser by default. However, you can direct them to use the embedded web view instead. There are specificities that depend on the mobile platform: Universal Windows Platform (UWP), iOS, or Android.
149
148
150
-
Some scenarios, like those that involve Conditional Access related to a device ID or a device enrollment, require a broker to be installed on the device. Examples of brokers are Microsoft Company Portal on Android and Microsoft Authenticator on Android and iOS. MSAL can now interact with brokers. For more information about brokers, see [Leveraging brokers on Android and iOS](https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/wiki/leveraging-brokers-on-Android-and-iOS).
149
+
Some scenarios, like those that involve Conditional Access related to a device ID or a device enrollment, require a broker to be installed on the device. Examples of brokers are Microsoft Company Portal on Android and Microsoft Authenticator on Android and iOS. MSAL can now interact with brokers. For more information about brokers, see [Leveraging brokers on Android and iOS](msal-net-use-brokers-with-xamarin-apps.md).
151
150
152
151
For more information, see [Mobile app that calls web APIs](scenario-mobile-overview.md).
For more iOS details, see [Migrate iOS applications that use Microsoft Authenticator from ADAL.NET to MSAL.NET](msal-net-migration-ios-broker.md) and [Leveraging the broker on iOS](https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/Leveraging-the-broker-on-iOS).
132
+
For more iOS details, see [Migrate iOS applications that use Microsoft Authenticator from ADAL.NET to MSAL.NET](msal-net-migration-ios-broker.md) and [Leveraging the broker on iOS](msal-net-use-brokers-with-xamarin-apps.md).
133
133
For more Android details, see [Brokered auth in Android](msal-android-single-sign-on.md).
Copy file name to clipboardExpand all lines: articles/active-directory/develop/scenario-web-app-call-api-acquire-token.md
+8-12Lines changed: 8 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.service: active-directory
9
9
ms.subservice: develop
10
10
ms.topic: conceptual
11
11
ms.workload: identity
12
-
ms.date: 05/06/2022
12
+
ms.date: 08/11/2023
13
13
ms.author: cwerner
14
14
ms.reviewer: jmprieur
15
15
ms.custom: aaddev
@@ -81,19 +81,15 @@ These advanced steps are covered in chapter 3 of the [3-WebApp-multi-APIs](https
81
81
82
82
The code for ASP.NET is similar to the code shown for ASP.NET Core:
83
83
84
-
- A controller action, protected by an [Authorize] attribute, extracts the tenant ID and user ID of the `ClaimsPrincipal` member of the controller. (ASP.NET uses `HttpContext.User`.)
85
-
*Microsoft.Identity.Web* adds extension methods to the Controller that provide convenience services to call Microsoft Graph or a downstream web API, or to get an authorization header, or even a token. The methods used to call an API directly are explained in detail in [A web app that calls web APIs: Call an API](scenario-web-app-call-api-call-api.md). With these helper methods, you don't need to manually acquire a token.
84
+
- A controller action, protected by an `[Authorize]` attribute, extracts the tenant ID and user ID of the `ClaimsPrincipal` member of the controller (ASP.NET uses `HttpContext.User`). This ensures that only authenticated users can use the app.
85
+
**Microsoft.Identity.Web** adds extension methods to the Controller that provide convenience services to call Microsoft Graph or a downstream web API, or to get an authorization header, or even a token. The methods used to call an API directly are explained in detail in [A web app that calls web APIs: Call an API](scenario-web-app-call-api-call-api.md). With these helper methods, you don't need to manually acquire a token.
86
86
87
-
If, however, you do want to manually acquire a token or build an authorization header, the following code shows how to use *Microsoft.Identity.Web* to do so in a controller. It calls an API (Microsoft Graph) using the REST API instead of the Microsoft Graph SDK.
87
+
If, however, you do want to manually acquire a token or build an authorization header, the following code shows how to use Microsoft.Identity.Web to do so in a controller. It calls an API (Microsoft Graph) using the REST API instead of the Microsoft Graph SDK.
88
88
89
89
To get an authorization header, you get an `IAuthorizationHeaderProvider` service from the controller using an extension method `GetAuthorizationHeaderProvider`. To get an authorization header to call an API on behalf of the user, use `CreateAuthorizationHeaderForUserAsync`. To get an authorization header to call a downstream API on behalf of the application itself, in a daemon scenario, use `CreateAuthorizationHeaderForAppAsync`.
90
90
91
-
The controller methods are protected by an `[Authorize]` attribute that ensures only authenticated users can use the web app.
92
-
93
-
94
91
The following snippet shows the action of the `HomeController`, which gets an authorization header to call Microsoft Graph as a REST API:
95
92
96
-
97
93
```csharp
98
94
[Authorize]
99
95
publicclassHomeController : Controller
@@ -139,7 +135,7 @@ public class HomeController : Controller
139
135
140
136
# [Java](#tab/java)
141
137
142
-
In the Java sample, the code that calls an API is in the getUsersFromGraph method in [AuthPageController.java#L62](https://github.com/Azure-Samples/ms-identity-java-webapp/blob/d55ee4ac0ce2c43378f2c99fd6e6856d41bdf144/src/main/java/com/microsoft/azure/msalwebsample/AuthPageController.java#L62).
138
+
In the Java sample, the code that calls an API is in the `getUsersFromGraph` method in [AuthPageController.java#L62](https://github.com/Azure-Samples/ms-identity-java-webapp/blob/d55ee4ac0ce2c43378f2c99fd6e6856d41bdf144/src/main/java/com/microsoft/azure/msalwebsample/AuthPageController.java#L62).
143
139
144
140
The method attempts to call `getAuthResultBySilentFlow`. If the user needs to consent to more scopes, the code processes the `MsalInteractionRequiredException` object to challenge the user.
145
141
@@ -201,7 +197,7 @@ public ModelAndView getUserFromGraph(HttpServletRequest httpRequest, HttpServlet
201
197
202
198
# [Node.js](#tab/nodejs)
203
199
204
-
In the Node.js sample, the code that acquires a token is in the *acquireToken* method of the **AuthProvider** class.
200
+
In the Node.js sample, the code that acquires a token is in the `acquireToken` method of the `AuthProvider` class.
@@ -211,7 +207,7 @@ This access token is then used to handle requests to the `/profile` endpoint:
211
207
212
208
# [Python](#tab/python)
213
209
214
-
In the Python sample, the code that calls the API is in `app.py`.
210
+
In the Python sample, the code that calls the API is in *app.py*.
215
211
216
212
The code attempts to get a token from the token cache. If it can't get a token, it redirects the user to the sign-in route. Otherwise, it can proceed to call the API.
217
213
@@ -246,4 +242,4 @@ Move on to the next article in this scenario,
246
242
Move on to the next article in this scenario,
247
243
[Call a web API](scenario-web-app-call-api-call-api.md?tabs=python).
Copy file name to clipboardExpand all lines: articles/active-directory/develop/single-sign-on-saml-protocol.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Azure single sign-on SAML protocol
2
+
title: Single sign-on SAML protocol
3
3
description: This article describes the single sign-on (SSO) SAML protocol in Azure Active Directory
4
4
services: active-directory
5
5
documentationcenter: .net
@@ -10,7 +10,7 @@ ms.service: active-directory
10
10
ms.subservice: develop
11
11
ms.workload: identity
12
12
ms.topic: conceptual
13
-
ms.date: 08/31/2022
13
+
ms.date: 08/11/2023
14
14
ms.author: owenrichards
15
15
ms.reviewer: kenwith
16
16
ms.custom: aaddev
@@ -44,14 +44,14 @@ To request a user authentication, cloud services send an `AuthnRequest` element
44
44
45
45
| Parameter | Type | Description |
46
46
| --- | --- | --- |
47
-
|ID| Required | Azure AD uses this attribute to populate the `InResponseTo` attribute of the returned response. ID must not begin with a number, so a common strategy is to prepend a string like "ID" to the string representation of a GUID. For example, `id6c1c178c166d486687be4aaf5e482730` is a valid ID. |
48
-
| Version | Required | This parameter should be set to **2.0**. |
49
-
| IssueInstant | Required | This is a DateTime string with a UTC value and [round-trip format ("o")](/dotnet/standard/base-types/standard-date-and-time-format-strings). Azure AD expects a DateTime value of this type, but doesn't evaluate or use the value. |
50
-
| AssertionConsumerServiceURL | Optional | If provided, this parameter must match the `RedirectUri` of the cloud service in Azure AD. |
51
-
| ForceAuthn | Optional | This is a boolean value. If true, it means that the user will be forced to re-authenticate, even if they have a valid session with Azure AD. |
52
-
| IsPassive | Optional | This is a boolean value that specifies whether Azure AD should authenticate the user silently, without user interaction, using the session cookie if one exists. If this is true, Azure AD will attempt to authenticate the user using the session cookie. |
53
-
54
-
All other `AuthnRequest` attributes, such as Consent, Destination, AssertionConsumerServiceIndex, AttributeConsumerServiceIndex, and ProviderName are **ignored**.
47
+
|`ID`| Required | Azure AD uses this attribute to populate the `InResponseTo` attribute of the returned response. ID must not begin with a number, so a common strategy is to prepend a string like "ID" to the string representation of a GUID. For example, `id6c1c178c166d486687be4aaf5e482730` is a valid ID. |
48
+
|`Version`| Required | This parameter should be set to `2.0`. |
49
+
|`IssueInstant`| Required | This is a DateTime string with a UTC value and [round-trip format ("o")](/dotnet/standard/base-types/standard-date-and-time-format-strings). Azure AD expects a DateTime value of this type, but doesn't evaluate or use the value. |
50
+
|`AssertionConsumerServiceURL`| Optional | If provided, this parameter must match the `RedirectUri` of the cloud service in Azure AD. |
51
+
|`ForceAuthn`| Optional | This is a boolean value. If true, it means that the user will be forced to re-authenticate, even if they have a valid session with Azure AD. |
52
+
|`IsPassive`| Optional | This is a boolean value that specifies whether Azure AD should authenticate the user silently, without user interaction, using the session cookie if one exists. If this is true, Azure AD will attempt to authenticate the user using the session cookie. |
53
+
54
+
All other `AuthnRequest` attributes, such as `Consent`, `Destination`, `AssertionConsumerServiceIndex`, `AttributeConsumerServiceIndex`, and `ProviderName` are **ignored**.
55
55
56
56
Azure AD also ignores the `Conditions` element in `AuthnRequest`.
# Application types for the Microsoft identity platform
19
19
20
-
The Microsoft identity platform supports authentication for various modern app architectures, all of them based on industry-standard protocols [OAuth 2.0 or OpenID Connect](./v2-protocols.md). This article describes the types of apps that you can build by using Microsoft identity platform, regardless of your preferred language or platform. The information is designed to help you understand high-level scenarios before you start working with the code in the [application scenarios](authentication-flows-app-scenarios.md#application-scenarios).
20
+
The Microsoft identity platform supports authentication for various modern app architectures, all of them based on industry-standard protocols [OAuth 2.0 or OpenID Connect](./v2-protocols.md). This article describes the types of apps that you can build by using Microsoft identity platform, regardless of your preferred language or platform. The information is designed to help you understand high-level scenarios before you start working with the code in the [application scenarios](authentication-flows-app-scenarios.md#application-types).
Copy file name to clipboardExpand all lines: articles/active-directory/develop/v2-oauth-ropc.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Sign in with resource owner password credentials grant
2
+
title: Microsoft identity platform and OAuth 2.0 Resource Owner Password Credentials
3
3
description: Support browser-less authentication flows using the resource owner password credential (ROPC) grant.
4
4
services: active-directory
5
5
author: OwenRichards1
@@ -9,7 +9,7 @@ ms.service: active-directory
9
9
ms.subservice: develop
10
10
ms.workload: identity
11
11
ms.topic: conceptual
12
-
ms.date: 08/26/2022
12
+
ms.date: 08/11/2023
13
13
ms.author: owenrichards
14
14
ms.reviewer: ludwignick
15
15
ms.custom: aaddev
@@ -22,7 +22,6 @@ The Microsoft identity platform supports the [OAuth 2.0 Resource Owner Password
22
22
> [!WARNING]
23
23
> Microsoft recommends you do _not_ use the ROPC flow. In most scenarios, more secure alternatives are available and recommended. This flow requires a very high degree of trust in the application, and carries risks that are not present in other flows. You should only use this flow when other more secure flows aren't viable.
24
24
25
-
26
25
> [!IMPORTANT]
27
26
>
28
27
> * The Microsoft identity platform only supports the ROPC grant within Azure AD tenants, not personal accounts. This means that you must use a tenant-specific endpoint (`https://login.microsoftonline.com/{TenantId_or_Name}`) or the `organizations` endpoint.
0 commit comments