Skip to content

Commit f41d6ce

Browse files
committed
Review feedback and minor changes
1 parent d07d169 commit f41d6ce

9 files changed

+94
-96
lines changed

articles/active-directory/develop/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
- name: Custom Authentication Extensions
7373
displayName: Custom Authentication Extensions
7474
items:
75-
- name: Custom extensions
75+
- name: Overview
7676
href: custom-extension-overview.md
7777
- name: Custom claims provider
7878
href: custom-claims-provider-overview.md

articles/active-directory/develop/custom-claims-provider-overview.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ ms.custom: aaddev
1717
#Customer intent: As a developer, I want to learn about custom claims provider so that I can augment tokens with claims from an external identity system or role management system.
1818
---
1919

20-
# Custom claims provider
20+
# Custom claims provider (preview)
2121

22-
This article provides an overview to the custom claims provider, as part of [custom authentication extensions](./custom-extension-overview.md).
22+
This article provides an overview to the Azure Active Directory (Azure AD) custom claims provider.
2323
When a user authenticates to an application, a custom claims provider can be used to add claims into the token. A custom claims provider is made up of a custom extension that calls an external REST API, to fetch claims from external systems. A custom claims provider can be assigned to one or many applications in your directory.
2424

2525
Key data about a user is often stored in systems external to Azure AD. For example, secondary email, billing tier, or sensitive information. Some applications may rely on these attributes for the application to function as designed. For example, the application may block access to certain features based on a claim in the token.
@@ -31,9 +31,9 @@ Use a custom claims provider for the following scenarios:
3131

3232
## Token issuance start event listener
3333

34-
A custom claims provider allows mapping claims from an external source into the token when the user signs into an application. It uses a custom extension to fetch attributes from an external REST API. The custom extension uses the **token issuance start** event listener, which causes it to be triggered when a token is about to be issued by Azure AD. The trigger event is configured within the custom extension, by using the **token issuance start** event type.
34+
An event listener is a procedure that waits for an event to occur. The custom extension uses the **token issuance start** event listener. The event is triggered when a token is about to be issued to your application. When the event is triggered the custom extension REST API is called to fetch attributes from external systems.
3535

36-
For an example using a custom claims provider with the **token issuance start**, check out the [get started with custom claims providers](custom-extension-get-started.md) article.
36+
For an example using a custom claims provider with the **token issuance start** event listener, check out the [get started with custom claims providers](custom-extension-get-started.md) article.
3737

3838
## Next steps
3939

articles/active-directory/develop/custom-claims-provider-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ms.custom: aaddev
1919

2020
# Custom claims providers
2121

22-
In this reference article, you can learn about the REST API schema and Claims mapping policy structure for custom claim provider events.
22+
In this reference article, you can learn about the REST API schema and claims mapping policy structure for custom claim provider events.
2323

2424
## Token issuance start event
2525

articles/active-directory/develop/custom-extension-get-started.md

Lines changed: 86 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Get started with custom claims providers (preview)
33
titleSuffix: Microsoft identity platform
4-
description: Use a custom authentication extension to augment tokens with claims from an external identity system. Learn how to create and deploy a custom authentication extension REST API. The REST API receives HTTP requests, or events, from the Azure AD event service and return attributes from an external data store. Learn how to register the custom authentication extensions so the Azure AD event service sends an HTTP request, or event, to your custom authentication extensionsAPI endpoint.
4+
description: Learn how to develop and register an Azure Active Directory custom extensions REST API. The custom extension allows you to source claims from a data store that is external to Azure Active Directory.
55
services: active-directory
66
author: yoelhor
77
manager: CelesteDG
@@ -19,7 +19,7 @@ ms.reviewer: JasSuri
1919

2020
# Configure a custom claim provider token issuance event (preview)
2121

22-
This article describes how to configure and setup a custom authentication extension with the [token issuance start event](custom-claims-provider-overview.md#token-issuance-start-event-listener) type. This event is triggered right before the token is issued, and allows you to call a REST API to add claims to the token.
22+
This article describes how to configure and setup a custom claims provider with the [token issuance start event](custom-claims-provider-overview.md#token-issuance-start-event-listener) type. This event is triggered right before the token is issued, and allows you to call a REST API to add claims to the token.
2323

2424
This how-to guide demonstrates the token issuance start event with a REST API running in Azure Functions and a sample OpenID Connect application.
2525

@@ -194,11 +194,11 @@ Create an Application Registration to authenticate your custom extension to your
194194
1. Paste the URL: `https://graph.microsoft.com/v1.0/applications`
195195
1. Select **Request Body** and paste the following JSON:
196196

197-
```json
198-
{
199-
"displayName": "authenticationeventsAPI"
200-
}
201-
```
197+
```json
198+
{
199+
"displayName": "authenticationeventsAPI"
200+
}
201+
```
202202

203203
1. Select **Run Query** to submit the request.
204204

@@ -210,11 +210,11 @@ Create a service principal in the tenant for the authenticationeventsAPI app reg
210210
1. Paste the URL: `https://graph.microsoft.com/v1.0/servicePrincipals`
211211
1. Select **Request Body** and paste the following JSON:
212212

213-
```json
214-
{
215-
"appId": "{authenticationeventsAPI_AppId}"
216-
}
217-
```
213+
```json
214+
{
215+
"appId": "{authenticationeventsAPI_AppId}"
216+
}
217+
```
218218

219219
1. Select **Run Query** to submit the request.
220220

@@ -226,37 +226,37 @@ Update the newly created application to set the application ID URI value, the ac
226226
1. Paste the URL: `https://graph.microsoft.com/v1.0/applications/{authenticationeventsAPI_ObjectId}`
227227
1. Select **Request Body** and paste the following JSON:
228228

229-
Set the application ID URI value in the *identifierUris* property. Replace `{Function_Url_Hostname}` with the hostname of the `{Function_Url}` you recorded earlier.
230-
231-
Set the `{authenticationeventsAPI_AppId}` value with the App ID generated from the app registration created in the previous step.
232-
233-
An example value would be `api://authenticationeventsAPI.azurewebsites.net/f4a70782-3191-45b4-b7e5-dd415885dd80`. Take note of this value as it is used in following steps and is referenced as `{functionApp_IdentifierUri}`.
234-
235-
```json
236-
{
237-
"identifierUris": [
238-
"api://{Function_Url_Hostname}/{authenticationeventsAPI_AppId}"
239-
],
240-
"api": {
241-
"requestedAccessTokenVersion": 2,
242-
"acceptMappedClaims": null,
243-
"knownClientApplications": [],
244-
"oauth2PermissionScopes": [],
245-
"preAuthorizedApplications": []
246-
},
247-
"requiredResourceAccess": [
248-
{
249-
"resourceAppId": "00000003-0000-0000-c000-000000000000",
250-
"resourceAccess": [
251-
{
252-
"id": "214e810f-fda8-4fd7-a475-29461495eb00",
253-
"type": "Role"
254-
}
255-
]
256-
}
257-
]
258-
}
259-
```
229+
Set the application ID URI value in the *identifierUris* property. Replace `{Function_Url_Hostname}` with the hostname of the `{Function_Url}` you recorded earlier.
230+
231+
Set the `{authenticationeventsAPI_AppId}` value with the App ID generated from the app registration created in the previous step.
232+
233+
An example value would be `api://authenticationeventsAPI.azurewebsites.net/f4a70782-3191-45b4-b7e5-dd415885dd80`. Take note of this value as it is used in following steps and is referenced as `{functionApp_IdentifierUri}`.
234+
235+
```json
236+
{
237+
"identifierUris": [
238+
"api://{Function_Url_Hostname}/{authenticationeventsAPI_AppId}"
239+
],
240+
"api": {
241+
"requestedAccessTokenVersion": 2,
242+
"acceptMappedClaims": null,
243+
"knownClientApplications": [],
244+
"oauth2PermissionScopes": [],
245+
"preAuthorizedApplications": []
246+
},
247+
"requiredResourceAccess": [
248+
{
249+
"resourceAppId": "00000003-0000-0000-c000-000000000000",
250+
"resourceAccess": [
251+
{
252+
"id": "214e810f-fda8-4fd7-a475-29461495eb00",
253+
"type": "Role"
254+
}
255+
]
256+
}
257+
]
258+
}
259+
```
260260

261261
1. Select **Run Query** to submit the request.
262262

@@ -268,35 +268,35 @@ Next, you register the custom extension. You register the custom extension by as
268268
1. Paste the URL: `https://graph.microsoft.com/beta/identity/customAuthenticationExtensions`
269269
1. Select **Request Body** and paste the following JSON:
270270

271-
Replace `{Function_Url}` with the hostname of your Azure Function app. Replace `{functionApp_IdentifierUri}` with the identifierUri used in the previous step.
272-
273-
```json
274-
{
275-
"@odata.type": "#microsoft.graph.onTokenIssuanceStartCustomExtension",
276-
"displayName": "onTokenIssuanceStartCustomExtension",
277-
"description": "Fetch additional claims from custom user store",
278-
"endpointConfiguration": {
279-
"@odata.type": "#microsoft.graph.httpRequestEndpoint",
280-
"targetUrl": "{Function_Url}"
281-
},
282-
"authenticationConfiguration": {
283-
"@odata.type": "#microsoft.graph.azureAdTokenAuthentication",
284-
"resourceId": "{functionApp_IdentifierUri}"
285-
},
286-
"clientConfiguration": {
287-
"timeoutInMilliseconds": 2000,
288-
"maximumRetries": 1
289-
},
290-
"claimsForTokenConfiguration": [
291-
{
292-
"claimIdInApiResponse": "DateOfBirth"
271+
Replace `{Function_Url}` with the hostname of your Azure Function app. Replace `{functionApp_IdentifierUri}` with the identifierUri used in the previous step.
272+
273+
```json
274+
{
275+
"@odata.type": "#microsoft.graph.onTokenIssuanceStartCustomExtension",
276+
"displayName": "onTokenIssuanceStartCustomExtension",
277+
"description": "Fetch additional claims from custom user store",
278+
"endpointConfiguration": {
279+
"@odata.type": "#microsoft.graph.httpRequestEndpoint",
280+
"targetUrl": "{Function_Url}"
293281
},
294-
{
295-
"claimIdInApiResponse": "CustomRoles"
296-
}
297-
]
298-
}
299-
```
282+
"authenticationConfiguration": {
283+
"@odata.type": "#microsoft.graph.azureAdTokenAuthentication",
284+
"resourceId": "{functionApp_IdentifierUri}"
285+
},
286+
"clientConfiguration": {
287+
"timeoutInMilliseconds": 2000,
288+
"maximumRetries": 1
289+
},
290+
"claimsForTokenConfiguration": [
291+
{
292+
"claimIdInApiResponse": "DateOfBirth"
293+
},
294+
{
295+
"claimIdInApiResponse": "CustomRoles"
296+
}
297+
]
298+
}
299+
```
300300

301301
1. Select **Run Query** to submit the request.
302302

@@ -444,15 +444,15 @@ Next, create the claims mapping policy, which describes which claims can be issu
444444
1. Paste the URL: `https://graph.microsoft.com/v1.0/policies/claimsmappingpolicies`
445445
1. Select **Request Body** and paste the following JSON:
446446

447-
```json
448-
{
449-
"definition": [
450-
"{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"CustomClaimsProvider\",\"ID\":\"DateOfBirth\",\"JwtClaimType\":\"dob\"},{\"Source\":\"CustomClaimsProvider\",\"ID\":\"CustomRoles\",\"JwtClaimType\":\"my_roles\"},{\"Source\":\"CustomClaimsProvider\",\"ID\":\"CorrelationId\",\"JwtClaimType\":\"correlationId\"},{\"Source\":\"CustomClaimsProvider\",\"ID\":\"ApiVersion\",\"JwtClaimType\":\"apiVersion \"},{\"Value\":\"tokenaug_V2\",\"JwtClaimType\":\"policy_version\"}]}}"
451-
],
452-
"displayName": "MyClaimsMappingPolicy",
453-
"isOrganizationDefault": false
454-
}
455-
```
447+
```json
448+
{
449+
"definition": [
450+
"{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"CustomClaimsProvider\",\"ID\":\"DateOfBirth\",\"JwtClaimType\":\"dob\"},{\"Source\":\"CustomClaimsProvider\",\"ID\":\"CustomRoles\",\"JwtClaimType\":\"my_roles\"},{\"Source\":\"CustomClaimsProvider\",\"ID\":\"CorrelationId\",\"JwtClaimType\":\"correlationId\"},{\"Source\":\"CustomClaimsProvider\",\"ID\":\"ApiVersion\",\"JwtClaimType\":\"apiVersion \"},{\"Value\":\"tokenaug_V2\",\"JwtClaimType\":\"policy_version\"}]}}"
451+
],
452+
"displayName": "MyClaimsMappingPolicy",
453+
"isOrganizationDefault": false
454+
}
455+
```
456456

457457
1. Record the `ID` generated in the response, later it's referred to as `{claims_mapping_policy_ID}`.
458458
1. Select **Run Query** to submit the request.
@@ -469,11 +469,11 @@ Assign the claims mapping policy to the `servicePrincipal` of *My Test Applicati
469469
1. Paste the URL: `https://graph.microsoft.com/v1.0/servicePrincipals/{test_App_Service_Principal_ObjectId}/claimsMappingPolicies/$ref`
470470
1. Select **Request Body** and paste the following JSON:
471471

472-
```json
473-
{
474-
"@odata.id": "https://graph.microsoft.com/v1.0/policies/claimsMappingPolicies/{claims_mapping_policy_ID}"
475-
}
476-
```
472+
```json
473+
{
474+
"@odata.id": "https://graph.microsoft.com/v1.0/policies/claimsMappingPolicies/{claims_mapping_policy_ID}"
475+
}
476+
```
477477

478478
1. Select **Run Query** to submit the request.
479479

@@ -497,7 +497,7 @@ To protect your Azure function, follow these steps to integrate Azure AD authent
497497
1. Unselect the **Token store** option.
498498
1. Select **Add** to add authentication to your Azure Function.
499499

500-
:::image type="content" border="false" source="media/custom-extension-get-started/configure-auth-function-app.png" alt-text="Screenshot that shows how to add authentication to your function app." lightbox="media/custom-extension-get-started/configure-auth-function-app.png":::
500+
:::image type="content" border="true" source="media/custom-extension-get-started/configure-auth-function-app.png" alt-text="Screenshot that shows how to add authentication to your function app." lightbox="media/custom-extension-get-started/configure-auth-function-app.png":::
501501

502502
### 5.1 Using OpenID Connect identity provider
503503

articles/active-directory/develop/custom-extension-overview.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Custom authentication extension
33
titleSuffix: Microsoft identity platform
4-
description: Use a custom authentication extension to augment tokens with claims from an external identity system or role management system. Custom authentication extensions can be used to migrate from AD FS or legacy systems. You can also integrate with data stores external to your Azure AD directory or keep sensitive information stored outside of your Azure AD directory.
4+
description: Use Azure Active Directory custom extensions to customize your user's sign-in experience by using REST APIs or outbound webhooks.
55
services: active-directory
66
author: yoelhor
77
manager: CelesteDG
@@ -33,8 +33,6 @@ The following diagram depicts the sign-in flow integrated with a custom extensio
3333
1. The Azure AD **custom extension** processes the response and customizes the authentication based on the event type and the HTTP response payload.
3434
1. A **token** is returned to the **app**.
3535

36-
Depending on the custom extension, it could be integrated in different authentication journeys, for example self-service sign-up.
37-
3836
## Custom extension REST API endpoint
3937

4038
When an event fires, Azure AD calls a REST API endpoint you own. The request to the REST API contains information about the event, the user profile, authentication request data, and other context information.

articles/active-directory/develop/custom-extension-troubleshoot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ To test your API directly from the Postman, follow these steps:
175175
One of the most common issues is that your custom claims provider API doesn't respond within the two-seconds timeout. If your REST API doesn't respond in subsequent retries, then the authentication fails. To improve the performance of your REST API, follow the below suggestions:
176176
177177
1. If your API accesses any downstream APIs, cache the access token used to call these APIs, so a new token doesn't have to be acquired on every execution.
178-
1. Performance issues are often been in a downstream service. Add logging, which records the process time to call to any downstream services.
178+
1. Performance issues are often related to downstream services. Add logging, which records the process time to call to any downstream services.
179179
1. If you use a cloud provider to host your API, use a hosting plan that keeps the API always "warm". For Azure Functions, it can be either [the Premium plan or Dedicated plan](../../azure-functions/functions-scale.md).
180180
1. [Run automated integration tests](test-automate-integration-testing.md) for your authentications. You can also use Postman or other tools to test just your API performance.
181181
37.7 KB
Loading

0 commit comments

Comments
 (0)