Skip to content

Commit a19f4b3

Browse files
authored
Merge pull request #90281 from MicrosoftDocs/master
10/01 PM Publish
2 parents d4c9821 + d3c4a49 commit a19f4b3

File tree

152 files changed

+1411
-389
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+1411
-389
lines changed

.openpublishing.redirection.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42115,6 +42115,21 @@
4211542115
"source_path": "articles/cloudfoundry/use-osba-pcf-app.md",
4211642116
"redirect_url": "/azure/cloudfoundry",
4211742117
"redirect_document_id": false
42118+
},
42119+
{
42120+
"source_path": "articles/security/compliance/azure-services-in-fedramp-auditscope.md",
42121+
"redirect_url": "/azure/azure-government/compliance/azure-services-in-fedramp-auditscope",
42122+
"redirect_document_id": false
42123+
},
42124+
{
42125+
"source_path": "articles/security/compliance/compliance-tic.md",
42126+
"redirect_url": "/azure/azure-government/compliance/compliance-tic",
42127+
"redirect_document_id": false
42128+
},
42129+
{
42130+
"source_path": "articles/security/compliance/secure-azure-computing-architecture.md",
42131+
"redirect_url": "/azure/azure-government/compliance/secure-azure-computing-architecture",
42132+
"redirect_document_id": false
4211842133
}
4211942134
]
4212042135
}

articles/active-directory-b2c/active-directory-b2c-devquickstarts-graph-dotnet.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,7 @@ To use the Azure AD Graph API with your B2C tenant, you need to register an appl
4545

4646
### Assign API access permissions
4747

48-
1. On the **Registered app** overview page, select **Settings**.
49-
1. Under **API ACCESS**, select **Required permissions**.
50-
1. Select **Windows Azure Active Directory**.
51-
1. Under **APPLICATION PERMISSIONS**, select **Read and write directory data**.
52-
1. Select **Save**.
53-
1. Select **Grant permissions**, and then select **Yes**. It might take a few minutes to for the permissions to fully propagate.
48+
[!INCLUDE [active-directory-b2c-permissions-directory](../../includes/active-directory-b2c-permissions-directory.md)]
5449

5550
### Create client secret
5651

articles/active-directory-b2c/active-directory-b2c-user-migration.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,7 @@ First, register an application that you can use for management tasks like user m
5555

5656
Next, grant the application the Azure AD Graph API permissions required for writing to the directory.
5757

58-
1. In the **Settings** menu, select **Required permissions**.
59-
1. Select **Windows Azure Active Directory**.
60-
1. In the **Enable Access** pane, under **Application Permissions**, select **Read and write directory data**, and then select **Save**.
61-
1. In the **Required permissions** pane, select **Grant Permissions**, then select **Yes**.
62-
63-
![Read/write directory checkbox, Save, and Grant permissions highlighted](media/active-directory-b2c-user-migration/pre-migration-app-registration-permissions.png)
58+
[!INCLUDE [active-directory-b2c-permissions-directory](../../includes/active-directory-b2c-permissions-directory.md)]
6459

6560
### Step 1.3: Create the application secret
6661

articles/active-directory-b2c/secure-api-management.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,17 @@ If you see the `401` status code, you've verified that only callers with a valid
199199

200200
## Support multiple applications and issuers
201201

202-
Several applications typically interact with a single REST API. To allow multiple applications to call your API, add their application IDs to the `<audiences>` element in the APIM inbound policy.
202+
Several applications typically interact with a single REST API. To enable your API to accept tokens intended for multiple applications, add their application IDs to the `<audiences>` element in the APIM inbound policy.
203203

204204
```XML
205-
<!-- Accept requests from multiple applications -->
205+
<!-- Accept tokens intended for these recipient applications -->
206206
<audiences>
207207
<audience>44444444-0000-0000-0000-444444444444</audience>
208208
<audience>66666666-0000-0000-0000-666666666666</audience>
209209
</audiences>
210210
```
211211

212-
Similarly, to support multiple token issuers, add their endpoint URIs to the `<audiences>` element in the APIM inbound policy.
212+
Similarly, to support multiple token issuers, add their endpoint URIs to the `<issuers>` element in the APIM inbound policy.
213213

214214
```XML
215215
<!-- Accept tokens from multiple issuers -->

articles/active-directory/develop/TOC.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,12 @@
276276
href: authentication-national-cloud.md
277277
- name: Authentication
278278
href: msal-national-cloud.md
279+
- name: Automatic user provisioning (SCIM)
280+
items:
281+
- name: What is automatic user provisioning?
282+
href: /azure/active-directory/manage-apps/user-provisioning
283+
- name: Building and integrating a SCIM endpoint
284+
href: /azure/active-directory/manage-apps/use-scim-to-provision-users-and-groups
279285
- name: How-to guides
280286
items:
281287
- name: Authentication

articles/active-directory/develop/scenario-web-app-call-api-acquire-token.md

Lines changed: 89 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.devlang: na
1212
ms.topic: conceptual
1313
ms.tgt_pltfrm: na
1414
ms.workload: identity
15-
ms.date: 09/09/2019
15+
ms.date: 09/30/2019
1616
ms.author: jmprieur
1717
ms.custom: aaddev
1818
#Customer intent: As an application developer, I want to know how to write a Web app that calls web APIs using the Microsoft identity platform for developers.
@@ -26,55 +26,55 @@ Now that you have built you client application object, you'll use it to acquire
2626
- Getting a token for the web API using the token cache. To get this token, you call `AcquireTokenSilent`.
2727
- Calling the protected API with the access token.
2828

29-
## ASP.NET Core
29+
# [ASP.NET Core](#tab/aspnetcore)
3030

3131
The controller methods are protected by an `[Authorize]` attribute that forces users being authenticated to use the Web App. Here is the code that calls Microsoft Graph.
3232

3333
```CSharp
3434
[Authorize]
3535
public class HomeController : Controller
3636
{
37-
...
37+
readonly ITokenAcquisition tokenAcquisition;
38+
39+
public HomeController(ITokenAcquisition tokenAcquisition)
40+
{
41+
this.tokenAcquisition = tokenAcquisition;
42+
}
43+
44+
// Code for the controller actions(see code below)
45+
3846
}
3947
```
4048

49+
The `ITokenAcquisition` service is injected by ASP.NET through dependency injection.
50+
51+
4152
Here is a simplified code of the action of the HomeController, which gets a token to call the Microsoft Graph.
4253

4354
```CSharp
4455
public async Task<IActionResult> Profile()
4556
{
46-
var application = BuildConfidentialClientApplication(HttpContext, HttpContext.User);
47-
string accountIdentifier = claimsPrincipal.GetMsalAccountId();
48-
string loginHint = claimsPrincipal.GetLoginHint();
49-
50-
// Get the account
51-
IAccount account = await application.GetAccountAsync(accountIdentifier);
52-
53-
// Special case for guest users as the Guest iod / tenant id are not surfaced.
54-
if (account == null)
55-
{
56-
var accounts = await application.GetAccountsAsync();
57-
account = accounts.FirstOrDefault(a => a.Username == loginHint);
58-
}
59-
60-
AuthenticationResult result;
61-
result = await application.AcquireTokenSilent(new []{"user.read"}, account)
62-
.ExecuteAsync();
63-
var accessToken = result.AccessToken;
64-
...
65-
// use the access token to call a web API
57+
// Acquire the access token
58+
string[] scopes = new string[]{"user.read"};
59+
string accessToken = await tokenAcquisition.GetAccessTokenOnBehalfOfUserAsync(scopes);
60+
61+
// use the access token to call a protected web API
62+
HttpClient client = new HttpClient();
63+
client.DefaultRequestHeaders.Add("Authorization", result.CreateAuthorizationHeader());
64+
string json = await client.GetStringAsync(url);
6665
}
6766
```
6867

6968
To understand more thoroughly the code required for this scenario, see the phase 2 ([2-1-Web App Calls Microsoft Graph](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/2-WebApp-graph-user/2-1-Call-MSGraph)) step of the [ms-identity-aspnetcore-webapp-tutorial](https://github.com/Azure-Samples/ms-identity-aspnetcore-webapp-tutorial) tutorial.
7069

7170
There are many additional complexities, such as:
7271

73-
- Implementing a token cache for the Web App (the tutorial presents several implementations)
74-
- Removing the account from the cache when the user signs out
75-
- Calling several APIs, including having incremental consent
72+
- Calling several APIs,
73+
- processing incremental consent and conditional access.
7674

77-
## ASP.NET
75+
These advanced steps are processed in chapter 3 of the tutorial [3-WebApp-multi-APIs](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/3-WebApp-multi-APIs)
76+
77+
# [ASP.NET](#tab/aspnet)
7878

7979
Things are similar in ASP.NET:
8080

@@ -84,6 +84,68 @@ Things are similar in ASP.NET:
8484

8585
The code is similar to the code shown for ASP.NET Core.
8686

87+
# [Java](#tab/java)
88+
89+
In the Java sample, the code that calls an API is in the getUsersFromGraph method [AuthPageController.java#L62](https://github.com/Azure-Samples/ms-identity-java-webapp/blob/d55ee4ac0ce2c43378f2c99fd6e6856d41bdf144/src/main/java/com/microsoft/azure/msalwebsample/AuthPageController.java#L62).
90+
91+
It attempts to call `getAuthResultBySilentFlow`. If the user needs to consent to more scopes, the code processes the `MsalInteractionRequiredException` to challenge the user.
92+
93+
```java
94+
@RequestMapping("/msal4jsample/graph/users")
95+
public ModelAndView getUsersFromGraph(HttpServletRequest httpRequest, HttpServletResponse response)
96+
throws Throwable {
97+
98+
IAuthenticationResult result;
99+
ModelAndView mav;
100+
try {
101+
result = authHelper.getAuthResultBySilentFlow(httpRequest, response);
102+
} catch (ExecutionException e) {
103+
if (e.getCause() instanceof MsalInteractionRequiredException) {
104+
105+
// If silent call returns MsalInteractionRequired, then redirect to Authorization endpoint
106+
// so user can consent to new scopes
107+
String state = UUID.randomUUID().toString();
108+
String nonce = UUID.randomUUID().toString();
109+
110+
SessionManagementHelper.storeStateAndNonceInSession(httpRequest.getSession(), state, nonce);
111+
112+
String authorizationCodeUrl = authHelper.getAuthorizationCodeUrl(
113+
httpRequest.getParameter("claims"),
114+
"User.ReadBasic.all",
115+
authHelper.getRedirectUriGraphUsers(),
116+
state,
117+
nonce);
118+
119+
return new ModelAndView("redirect:" + authorizationCodeUrl);
120+
} else {
121+
122+
mav = new ModelAndView("error");
123+
mav.addObject("error", e);
124+
return mav;
125+
}
126+
}
127+
// Code omitted here.
128+
```
129+
130+
# [Python](#tab/python)
131+
132+
In the python sample, the code calling Microsoft graph is in [app.py#L53-L62](https://github.com/Azure-Samples/ms-identity-python-webapp/blob/48637475ed7d7733795ebeac55c5d58663714c60/app.py#L53-L62).
133+
134+
It attempts to get a token from the token cache, and then calls the eb API after setting the authorization header. If it can't, it re-signs in the user.
135+
136+
```python
137+
@app.route("/graphcall")
138+
def graphcall():
139+
token = _get_token_from_cache(app_config.SCOPE)
140+
if not token:
141+
return redirect(url_for("login"))
142+
graph_data = requests.get( # Use token to call downstream service
143+
app_config.ENDPOINT,
144+
headers={'Authorization': 'Bearer ' + token['access_token']},
145+
).json()
146+
return render_template('display.html', result=graph_data)
147+
```
148+
87149
## Next steps
88150
89151
> [!div class="nextstepaction"]

articles/active-directory/develop/scenario-web-app-call-api-sign-in.md

Lines changed: 43 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.devlang: na
1212
ms.topic: conceptual
1313
ms.tgt_pltfrm: na
1414
ms.workload: identity
15-
ms.date: 05/07/2019
15+
ms.date: 09/30/2019
1616
ms.author: jmprieur
1717
ms.custom: aaddev
1818
#Customer intent: As an application developer, I want to know how to write a Web app that calls Web APIs using the Microsoft identity platform for developers.
@@ -25,32 +25,56 @@ You already know how to add sign-in to your web app. You learn that in [Web app
2525

2626
What is different here, is that when the user has signed out, from this application, or from any application, you want to remove from the token cache, the tokens associated with the user.
2727

28-
## Intercepting the callback after sign out - Single Sign Out
28+
## Intercepting the callback after sign-out - Single Sign Out
2929

30-
Your application can intercept the after `logout` event, for instance to clear the entry of the token cache associated with the account that signed out. We'll see in the second part of this tutorial (about the Web app calling a Web API), that the web app will store access tokens for the user in a cache. Intercepting the after `logout` callback enables your web application to remove the user from the token cache. This mechanism is illustrated in the `AddMsal()` method of [StartupHelper.cs L137-143](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/blob/b87a1d859ff9f9a4a98eb7b701e6a1128d802ec5/Microsoft.Identity.Web/StartupHelpers.cs#L137-L143)
30+
Your application can intercept the after `logout` event, for instance to clear the entry of the token cache associated with the account that signed out. The web app will store access tokens for the user in a cache. Intercepting the after `logout` callback enables your web application to remove the user from the token cache.
3131

32-
The **Logout Url** that you've registered for your application enables you to implement single sign out. The Microsoft identity platform `logout` endpoint will call the **Logout URL** registered with your application. This call happens if the sign-out was initiated from your web app, or from another web app or the browser. For more information, see [Single sign-out](https://docs.microsoft.com/azure/active-directory/develop/v2-protocols-oidc#single-sign-out) in the conceptual documentation.
32+
# [ASP.NET Core](#tab/aspnetcore)
33+
34+
This mechanism is illustrated in the `AddMsal()` method of [WebAppServiceCollectionExtensions.cs#L151-L157](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/blob/db7f74fd7e65bab9d21092ac1b98a00803e5ceb2/Microsoft.Identity.Web/WebAppServiceCollectionExtensions.cs#L151-L157)
35+
36+
The **Logout Url** that you've registered for your application enables you to implement single sign-out. The Microsoft identity platform `logout` endpoint will call the **Logout URL** registered with your application. This call happens if the sign-out was initiated from your web app, or from another web app or the browser. For more information, see [Single sign-out](v2-protocols-oidc.md#single-sign-out).
3337

3438
```CSharp
35-
public static IServiceCollection AddMsal(this IServiceCollection services, IEnumerable<string> initialScopes)
39+
public static class WebAppServiceCollectionExtensions
3640
{
37-
services.AddTokenAcquisition();
38-
39-
services.Configure<OpenIdConnectOptions>(AzureADDefaults.OpenIdScheme, options =>
40-
{
41-
...
42-
// Handling the sign-out: removing the account from MSAL.NET cache
43-
options.Events.OnRedirectToIdentityProviderForSignOut = async context =>
44-
{
45-
// Remove the account from MSAL.NET token cache
46-
var _tokenAcquisition = context.HttpContext.RequestServices.GetRequiredService<ITokenAcquisition>();
47-
await _tokenAcquisition.RemoveAccount(context);
48-
};
49-
});
50-
return services;
41+
public static IServiceCollection AddMsal(this IServiceCollection services, IConfiguration configuration, IEnumerable<string> initialScopes, string configSectionName = "AzureAd")
42+
{
43+
// Code omitted here
44+
45+
services.Configure<OpenIdConnectOptions>(AzureADDefaults.OpenIdScheme, options =>
46+
{
47+
// Code omitted here
48+
49+
// Handling the sign-out: removing the account from MSAL.NET cache
50+
options.Events.OnRedirectToIdentityProviderForSignOut = async context =>
51+
{
52+
// Remove the account from MSAL.NET token cache
53+
var tokenAcquisition = context.HttpContext.RequestServices.GetRequiredService<ITokenAcquisition>();
54+
await tokenAcquisition.RemoveAccountAsync(context).ConfigureAwait(false);
55+
};
56+
});
57+
return services;
58+
}
5159
}
5260
```
5361

62+
The code for RemoveAccountAsync is available from [Microsoft.Identity.Web/TokenAcquisition.cs#L264-L288](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/blob/db7f74fd7e65bab9d21092ac1b98a00803e5ceb2/Microsoft.Identity.Web/TokenAcquisition.cs#L264-L288).
63+
64+
# [ASP.NET](#tab/aspnet)
65+
66+
The ASP.NET sample doesn't remove accounts from the cache on global sign-out
67+
68+
# [Java](#tab/java)
69+
70+
The Java sample doesn't remove accounts from the cache on global sign-out
71+
72+
# [Python](#tab/python)
73+
74+
The Python sample doesn't remove accounts from the cache on global sign-out
75+
76+
---
77+
5478
## Next steps
5579

5680
> [!div class="nextstepaction"]

articles/active-directory/manage-apps/methods-for-assigning-users-and-groups.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Before you can assign users and groups to an application, you must require user
4646

4747
To assign one or more users to an application directly, follow the steps below:
4848

49-
1. Open the [**Azure portal**](https://portal.azure.com/) and sign in as a **Global Administrator.**
49+
1. Open the [**Azure portal**](https://portal.azure.com/) and sign in as a **Global Administrator or as a non-admin application owner.**
5050

5151
2. Open the **Azure Active Directory Extension** by clicking **All services** at the top of the main left hand navigation menu.
5252

@@ -84,7 +84,7 @@ After a short period of time, the users you have selected will be able to launch
8484

8585
To assign one or more groups to an application directly, follow the steps below:
8686

87-
1. Open the [**Azure portal**](https://portal.azure.com/) and sign in as a **Global Administrator.**
87+
1. Open the [**Azure portal**](https://portal.azure.com/) and sign in as a **Global Administrator** or as a non-admin application owner with an Azure AD Premium license assigned.
8888

8989
2. Open the **Azure Active Directory Extension** by clicking **All services** at the top of the main left hand navigation menu.
9090

articles/active-directory/manage-apps/use-scim-to-provision-users-and-groups.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Applications that support the SCIM profile described in this article can be conn
5656

5757
**To connect an application that supports SCIM:**
5858

59-
1. Sign in to the [Azure Active Directory portal](https://aad.portal.azure.com).
59+
1. Sign in to the [Azure Active Directory portal](https://aad.portal.azure.com). Note that you can get access a free trial for Azure Active Directory with P2 licenses by signing up for the [developer program](https://developer.microsoft.com/office/dev-program)
6060
1. Select **Enterprise applications** from the left pane. A list of all configured apps is shown, including apps that were added from the gallery.
6161
1. Select **+ New application** > **All** > **Non-gallery application**.
6262
1. Enter a name for your application, and select **Add** to create an app object. The new app is added to the list of enterprise applications and opens to its app management screen.
@@ -93,6 +93,9 @@ Once the initial cycle has started, you can select **Audit logs** in the left pa
9393
> [!NOTE]
9494
> The initial cycle takes longer to perform than later syncs, which occur approximately every 40 minutes as long as the service is running.
9595
96+
**To publish your application to the Azure AD application gallery:**
97+
98+
If you're building an application that will be used my more than one tenant, you can make it available in the Azure AD application gallery. This will make it easy for organizations to discover the application and configure provisioning. Publishing your app in the Azure AD gallery and making provisioning available to others is easy. Check out the steps [here](https://docs.microsoft.com/azure/active-directory/develop/howto-app-gallery-listing).
9699
## Understanding the Azure AD SCIM implementation
97100

98101
If you're building an application that supports a SCIM 2.0 user management API, this section describes in detail how the Azure AD SCIM client is implemented, and how you should model your SCIM protocol request handling and responses. Once you've implemented your SCIM endpoint, you can test it by following the procedure described in the previous section.

0 commit comments

Comments
 (0)