Skip to content

Commit 0ce1658

Browse files
Merge pull request #223812 from billmath/custom1
staging
2 parents a1a91ce + a344b0c commit 0ce1658

File tree

6 files changed

+167
-1
lines changed

6 files changed

+167
-1
lines changed
51.6 KB
Loading

articles/active-directory/app-provisioning/user-provisioning-sync-attributes-for-mapping.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ Adding missing attributes needed for an application will start in either on-prem
2323

2424
First, identify which users in your Azure AD tenant will need access to the application and therefore are going to be in scope of being provisioned into the application.
2525

26-
If any of those users originate in on-premises Active Directory, then you must sync the attributes with the users from Active Directory to Azure AD. You will need to perform the following tasks before configuring provisioning to your application.
26+
>[!NOTE]
27+
> For users in on-premises Active Directory, you must sync the users to Azure AD. You can sync users and attributes using [Azure AD Connect](../hybrid/whatis-azure-ad-connect.md) or [Azure AD Connect cloud sync](../cloud-sync/what-is-cloud-sync.md). Both of these solutions automatically synchronizes certain attributes to Azure AD, but not all attributes. Furthermore, some attributes (such as SAMAccountName) that are synchronized by default might not be exposed using the Graph API. In these cases, you can [use the Azure AD Connect directory extension feature to synchronize the attribute to Azure AD](#create-an-extension-attribute-using-azure-ad-connect) or [use Azure AD Connect cloud sync](#create-an-extension-attribute-using-cloud-sync). That way, the attribute will be visible to the Graph API and the Azure AD provisioning service.
2728
2829
1. Check with the on-premises Active Directory domain admins whether the required attributes are part of the AD DS schema, and if they are not, extend the AD DS schema in the domains where those users have accounts.
2930
1. Configure [Azure AD Connect](../hybrid/whatis-azure-ad-connect.md) or Azure AD Connect cloud sync to synchronize the users with their extension attribute from Active Directory to Azure AD. Azure AD Connect automatically synchronizes certain attributes to Azure AD, but not all attributes. Furthermore, some attributes (such as `sAMAccountName`) that are synchronized by default might not be exposed using the Graph API. In these cases, you can [use the Azure AD Connect directory extension feature to synchronize the attribute to Azure AD](#create-an-extension-attribute-using-azure-ad-connect). That way, the attribute will be visible to the Graph API and the Azure AD provisioning service.
@@ -113,6 +114,24 @@ Set-AzureADUserExtension -objectid 0ccf8df6-62f1-4175-9e55-73da9e742690 -Extensi
113114
Get-AzureADUser -ObjectId 0ccf8df6-62f1-4175-9e55-73da9e742690 | Select -ExpandProperty ExtensionProperty
114115
115116
```
117+
## Create an extension attribute using cloud sync
118+
Cloud sync will automatically discover your extensions in on-premises Active Directory when you go to add a new mapping. Use the steps below to auto-discover these attributes and set up a corresponding mapping to Azure AD.
119+
120+
1. Sign-in to the Azure portal with a hybrid administrator account
121+
2. Select Azure AD Connect
122+
3. Select **Manage Azure AD cloud sync**
123+
4. Select the configuration you wish to add the extension attribute and mapping
124+
5. Under **Manage attributes** select **click to edit mappings**
125+
6. Click **Add attribute mapping**. The attributes will automatically be discovered.
126+
7. The new attributes will be available in the drop-down under **source attribute**.
127+
8. Fill in the type of mapping you want and click **Apply**.
128+
[![Custom attribute mapping](media/user-provisioning-sync-attributes-for-mapping/schema-1.png)](media/user-provisioning-sync-attributes-for-mapping/schema-1.png#lightbox)
129+
130+
For more information, see [Cloud Sync Custom Attribute Mapping](../cloud-sync/custom-attribute-mapping.md)
131+
132+
133+
134+
116135

117136
## Create an extension attribute using Azure AD Connect
118137

articles/active-directory/cloud-sync/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
href: how-to-attribute-mapping.md
5353
- name: Use Single Sign-On
5454
href: how-to-sso.md
55+
- name: Directory extensions and custom attributes
56+
href: custom-attribute-mapping.md
5557
- name: Plan and design
5658
items:
5759
- name: Topologies and scenarios for Azure AD Connect cloud sync
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
---
2+
title: 'Azure AD Connect cloud sync directory extensions and custom attribute mapping'
3+
description: This topic provides information on custom attribute mapping in cloud sync.
4+
services: active-directory
5+
author: billmath
6+
manager: amycolannino
7+
ms.service: active-directory
8+
ms.workload: identity
9+
ms.custom: ignite-2022
10+
ms.topic: conceptual
11+
ms.date: 01/12/2023
12+
ms.subservice: hybrid
13+
ms.author: billmath
14+
ms.collection: M365-identity-device-management
15+
---
16+
17+
18+
19+
# Cloud Sync directory extensions and custom attribute mapping
20+
21+
## Directory extensions
22+
You can use directory extensions to extend the schema in Azure Active Directory (Azure AD) with your own attributes from on-premises Active Directory. This feature enables you to build LOB apps by consuming attributes that you continue to manage on-premises.
23+
24+
For additional information on directory extensions see [Using directory extension attributes in claims](../develop/active-directory-schema-extensions.md)
25+
26+
You can see the available attributes by using [Microsoft Graph Explorer](https://developer.microsoft.com/graph/graph-explorer). You can also use this feature to create dynamic groups in Azure AD.
27+
28+
>[!NOTE]
29+
> In order to discover new Active Directory extension attributes, the provisioning agent needs to be restarted. You should restart the agent after the directory extensions have been created. For Azure AD extension attributes, the agent doesn't need to be restarted.
30+
31+
## Syncing directory extensions for Azure Active Directory Connect cloud sync
32+
33+
You can use [directory extensions](https://learn.microsoft.com/graph/api/resources/extensionproperty?view=graph-rest-1.0) to extend the synchronization schema directory definition in Azure Active Directory (Azure AD) with your own attributes.
34+
35+
>[!Important]
36+
> Directory extension for Azure Active Directory Connect cloud sync is only supported for applications with the identifier URI “api://<tenantId>/CloudSyncCustomExtensionsApp” and the [Tenant Schema Extension App](../hybrid/how-to-connect-sync-feature-directory-extensions.md#configuration-changes-in-azure-ad-made-by-the-wizard) created by Azure AD Connect
37+
38+
### Create application and service principal for directory extension
39+
40+
You need to create an [application](https://learn.microsoft.com/graph/api/resources/application?view=graph-rest-1.0) with the identifier URI "api://<tenantId>/CloudSyncCustomExtensionsApp" if it doesn't exist and create a service principal for the application if it doesn't exist.
41+
42+
43+
1. Check if application with the identifier URI "api://<tenantId>/CloudSyncCustomExtensionsApp" exists.
44+
45+
- Using Microsoft Graph
46+
47+
```
48+
GET /applications?$filter=identifierUris/any(uri:uri eq 'api://<tenantId>/CloudSyncCustomExtensionsApp')
49+
```
50+
51+
For more information, see [Get application](https://learn.microsoft.com/graph/api/application-get?view=graph-rest-1.0&tabs=http)
52+
53+
- Using PowerShell
54+
55+
```
56+
Get-AzureADApplication -Filter "identifierUris/any(uri:uri eq 'api://<tenantId>/CloudSyncCustomExtensionsApp')"
57+
```
58+
59+
For more information, see [Get-AzureADApplication](https://learn.microsoft.com/powershell/module/azuread/get-azureadapplication?view=azureadps-2.0)
60+
61+
2. If the application doesn't exist, create the application with identifier URI “api://&LT;tenantId&GT;/CloudSyncCustomExtensionsApp.”
62+
63+
- Using Microsoft Graph
64+
```
65+
POST https://graph.microsoft.com/v1.0/applications
66+
Content-type: application/json
67+
68+
{
69+
"displayName": "CloudSyncCustomExtensionsApp",
70+
"identifierUris": ["api://<tenant id>/CloudSyncCustomExtensionsApp"]
71+
}
72+
```
73+
For more information, see [create application](https://learn.microsoft.com/graph/api/application-post-applications?view=graph-rest-1.0&tabs=http)
74+
75+
- Using PowerShell
76+
```
77+
New-AzureADApplication -DisplayName "CloudSyncCustomExtensionsApp" -IdentifierUris "api://<tenant id>/CloudSyncCustomExtensionsApp"
78+
```
79+
For more information, see [New-AzureADApplication](https://learn.microsoft.com/powershell/module/azuread/new-azureadapplication?view=azureadps-2.0)
80+
81+
82+
83+
3. Check if the service principal exists for the application with identifier URI “api://&LT;tenantId&GT;/CloudSyncCustomExtensionsApp”.
84+
85+
- Using Microsoft Graph
86+
```
87+
GET /servicePrincipals?$filter=(appId eq '{appId}')
88+
```
89+
For more information, see [get service principal](https://learn.microsoft.com/graph/api/serviceprincipal-get?view=graph-rest-1.0&tabs=http)
90+
91+
- Using PowerShell
92+
```
93+
Get-AzureADServicePrincipal -ObjectId '<application objectid>'
94+
```
95+
For more information, see [Get-AzureADServicePrincipal](https://learn.microsoft.com/powershell/module/azuread/get-azureadserviceprincipal?view=azureadps-2.0)
96+
97+
98+
4. If a service principal doesn't exist, create a new service principal for the application with identifier URI “api://&LT;tenantId&GT;/CloudSyncCustomExtensionsApp”
99+
100+
- Using Microsoft Graph
101+
```
102+
POST https://graph.microsoft.com/v1.0/servicePrincipals
103+
Content-type: application/json
104+
105+
{
106+
"appId":
107+
"<application appId>"
108+
}
109+
```
110+
For more information, see [create servicePrincipal](https://learn.microsoft.com/graph/api/serviceprincipal-post-serviceprincipals?view=graph-rest-1.0&tabs=http)
111+
112+
- Using PowerShell
113+
114+
```
115+
New-AzureADServicePrincipal -AppId '<appId>'
116+
```
117+
For more information, see [New-AzureADServicePrincipal](https://learn.microsoft.com/powershell/module/azuread/new-azureadserviceprincipal?view=azureadps-2.0)
118+
119+
5. You can create directory extensions in Azure AD in several different ways.
120+
121+
|Method|Description|URL|
122+
|-----|-----|-----|
123+
|MS Graph|Create extensions using GRAPH|[Create extensionProperty](https://learn.microsoft.com/graph/api/application-post-extensionproperty?view=graph-rest-1.0&tabs=http)|
124+
|PowerShell|Create extensions using PowerShell|[New-AzureADApplicationExtensionProperty](https://learn.microsoft.com/powershell/module/azuread/new-azureadapplicationextensionproperty?view=azureadps-2.0)|
125+
Using Cloud Sync and Azure AD Connect|Create extensions using Azure AD Connect|[Create an extension attribute using Azure AD Connect](https://learn.microsoft.com/azure/active-directory/app-provisioning/user-provisioning-sync-attributes-for-mapping#create-an-extension-attribute-using-azure-ad-connect)|
126+
|Customizing attributes to sync|Information on customizing which attributes to synch|[Customize which attributes to synchronize with Azure AD](https://learn.microsoft.com/azure/active-directory/hybrid/how-to-connect-sync-feature-directory-extensions#customize-which-attributes-to-synchronize-with-azure-ad)
127+
128+
## Use attribute mapping to map Directory Extensions
129+
If you have extended Active Directory to include custom attributes, you can add these attributes and map them to users.
130+
131+
To discover and map attributes, click **Add attribute mapping**. The attributes will automatically be discovered and will be available in the drop-down under **source attribute**. Fill in the type of mapping you want and click **Apply**.
132+
[![Custom attribute mapping](media/custom-attribute-mapping/schema-1.png)](media/custom-attribute-mapping/schema-1.png#lightbox)
133+
134+
For information on new attributes that are added and updated in Azure AD see the [user resource type](https://docs.microsoft.com/graph/api/resources/user?view=graph-rest-1.0#properties) and consider subscribing to [change notifications](https://docs.microsoft.com/graph/webhooks).
135+
136+
For more information on extension attributes, see [Syncing extension attributes for Azure Active Directory Application Provisioning](../app-provisioning/user-provisioning-sync-attributes-for-mapping.md)
137+
138+
## Additional resources
139+
140+
- [Understand the Azure AD schema and custom expressions](concept-attributes.md)
141+
- [Azure AD Connect sync: Directory extensions](../hybrid/how-to-connect-sync-feature-directory-extensions.md)
142+
- [Attribute mapping in Azure AD Connect cloud sync](how-to-attribute-mapping.md)

articles/active-directory/cloud-sync/how-to-configure.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ After saving, you should see a message telling you what you still need to do to
100100

101101
For more information, see [attribute mapping](how-to-attribute-mapping.md).
102102

103+
## Directory extensions and custom attribute mapping.
104+
Azure AD Connect cloud sync allows you to extend the directory with extensions and provides for custom attribute mapping. For more information see [Directory extensions and custom attribute mapping](custom-attribute-mapping.md).
105+
103106
## On-demand provisioning
104107
Azure AD Connect cloud sync allows you to test configuration changes, by applying these changes to a single user or group.
105108

51.6 KB
Loading

0 commit comments

Comments
 (0)