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-b2c/extensions-app.md
+25-7Lines changed: 25 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,15 +31,33 @@ To verify that the b2c-extensions-app is present:
31
31
32
32
## Recover the extensions app
33
33
34
-
If you accidentally deleted the b2c-extensions-app, you have 30 days to recover it. You can restore the app using the Graph API:
34
+
If you accidentally deleted the `b2c-extensions-app`, you have 30 days to recover it.
35
35
36
+
> [!NOTE]
37
+
> An application can only be restored if it has been deleted within the last 30 days. If it has been more than 30 days, data will be permanently lost. For more assistance, file a support ticket.
38
+
39
+
### Recover the extensions app using the Azure portal
40
+
41
+
1. Sign in to your Azure AD B2C tenant.
42
+
2. Search for and open **App registrations**.
43
+
1. Select the **Deleted applications** tab and identify the `b2c-extensions-app` from the list of recently deleted applications.
44
+
1. Select **Restore app registration**.
45
+
46
+
You should now be able to [see the restored app](#verifying-that-the-extensions-app-is-present) in the Azure portal.
47
+
48
+
### Recover the extensions app using Microsoft Graph
49
+
To restore the app using Microsoft Graph, you must restore both the application and the service principal.
50
+
51
+
To restore the application:
36
52
1. Browse to [https://developer.microsoft.com/en-us/graph/graph-explorer](https://developer.microsoft.com/en-us/graph/graph-explorer).
37
53
1. Log in to the site as a global administrator for the Azure AD B2C directory that you want to restore the deleted app for. This global administrator must have an email address similar to the following: `username@{yourTenant}.onmicrosoft.com`.
38
-
1. Issue an HTTP GET against the URL `https://graph.microsoft.com/beta/directory/deleteditems/microsoft.graph.application`. This operation will list all of the applications that have been deleted within the past 30 days.
39
-
1. Find the application in the list where the name begins with 'b2c-extensions-app’ and copy its `objectid` property value.
40
-
1. Issue an HTTP POST against the URL `https://graph.microsoft.com/beta/directory/deleteditems/{id}/restore`. Replace the `{id}` portion of the URL with the `objectid` from the previous step.
54
+
1. Issue an HTTP GET against the URL `https://graph.microsoft.com/v1.0/directory/deleteditems/microsoft.graph.application`. This operation will list all of the applications that have been deleted within the past 30 days. You can also use the URL `https://graph.microsoft.com/v1.0/directory/deletedItems/microsoft.graph.application?$filter=displayName eq 'b2c-extensions-app. Do not modify. Used by AADB2C for storing user data.'` to filter by the app's **displayName** property.
55
+
1. Find the application in the list where the name begins with `b2c-extensions-app` and copy its `id` property value.
56
+
1. Issue an HTTP POST against the URL `https://graph.microsoft.com/v1.0/directory/deleteditems/{id}/restore`. Replace the `{id}` portion of the URL with the `id` from the previous step.]
41
57
42
-
You should now be able to [see the restored app](#verifying-that-the-extensions-app-is-present) in the Azure portal.
58
+
To restore the service principal:
59
+
1. Issue an HTTP GET against the URL `https://graph.microsoft.com/v1.0/directory/deleteditems/microsoft.graph.servicePrincipal`. This operation will list all of the service principals that have been deleted within the past 30 days. You can also use the URL `https://graph.microsoft.com/v1.0/directory/deletedItems/microsoft.graph.servicePrincipal?$filter=displayName eq 'b2c-extensions-app. Do not modify. Used by AADB2C for storing user data.'` to filter by the app's **displayName** property.
60
+
1. Find the service principal in the list where the name begins with `b2c-extensions-app` and copy its `id` property value.
61
+
1. Issue an HTTP POST against the URL `https://graph.microsoft.com/v1.0/directory/deleteditems/{id}/restore`. Replace the `{id}` portion of the URL with the `id` from the previous step.
43
62
44
-
> [!NOTE]
45
-
> An application can only be restored if it has been deleted within the last 30 days. If it has been more than 30 days, data will be permanently lost. For more assistance, file a support ticket.
63
+
You should now be able to [see the restored app](#verifying-that-the-extensions-app-is-present) in the Azure portal.
-[Get available extension properties](/graph/api/directoryobject-getavailableextensionproperties)
146
+
Application extension properties are also known as directory or Azure AD extensions. To manage them in Azure AD B2C, use the [identityUserFlowAttribute resource type](/graph/api/resources/identityuserflowattribute) and its associated methods.
151
147
152
-
<!--
153
-
#Hiding this note because user flows and extension attributes are different things in Microsoft Graph.
148
+
-[Create user flow attribute](/graph/api/identityuserflowattribute-post)
149
+
-[List user flow attributes](/graph/api/identityuserflowattribute-list)
150
+
-[Get a user flow attribute](/graph/api/identityuserflowattribute-get)
151
+
-[Update a user flow attribute](/graph/api/identityuserflowattribute-update)
152
+
-[Delete a user flow attribute](/graph/api/identityuserflowattribute-delete)
154
153
155
-
Azure AD B2C provides a directory that can hold 100 custom attributes per user. For user flows, these extension properties are [managed by using the Azure portal](user-flow-custom-attributes.md). For custom policies, Azure AD B2C creates the property for you, the first time the policy writes a value to the extension property.
156
-
-->
154
+
You can store up to 100 directory extension values per user. To manage the directory extension properties for a user, use the following [User APIs](/graph/api/resources/user) in Microsoft Graph.
157
155
158
-
Azure AD B2C provides a directory that can hold 100 extension values per user. To manage the extension values for a user, use the following [User APIs](/graph/api/resources/user) in Microsoft Graph.
156
+
-[Update user](/graph/api/user-update): To write or remove the value of the directory extension property from the user object.
157
+
-[Get a user](/graph/api/user-get): To retrieve the value of the directory extension for the user. The property will be returned by default through the `beta` endpoint, but only on `$select` through the `v1.0` endpoint.
159
158
160
-
-[Update user](/graph/api/user-update): To write or remove the extension property value from the user.
161
-
-[Get a user](/graph/api/user-get): To retrieve the extension property value for the user. The extension property will be returned by default through the `beta` endpoint, but only on `$select` through the `v1.0` endpoint.
159
+
For user flows, these extension properties are [managed by using the Azure portal](user-flow-custom-attributes.md). For custom policies, Azure AD B2C creates the property for you, the first time the policy writes a value to the extension property.
160
+
161
+
> [!NOTE]
162
+
> In Azure AD, directory extensions are managed through the [extensionProperty resource type](/graph/api/resources/extensionproperty) and its associated methods. However, because they are used in B2C through the `b2c-extensions-app` app which should not be updated, they are managed in Azure AD B2C using the [identityUserFlowAttribute resource type](/graph/api/resources/identityuserflowattribute) and its associated methods.
162
163
163
164
## Audit logs
164
165
@@ -174,6 +175,15 @@ For more information about accessing Azure AD B2C audit logs, see [Accessing Azu
174
175
-[Update a Conditional Access policy](/graph/api/conditionalaccesspolicy-update)
175
176
-[Delete a Conditional Access policy](/graph/api/conditionalaccesspolicy-delete)
176
177
178
+
## Retrieve or restore deleted users and applications
179
+
180
+
Deleted items can only be restored if they were deleted within the last 30 days.
-[Get a deleted item](/graph/api/directory-deleteditems-get)
184
+
-[Restore a deleted item](/graph/api/directory-deleteditems-restore)
185
+
-[Permanently delete a deleted item](/graph/api/directory-deleteditems-delete)
186
+
177
187
## How to programmatically manage Microsoft Graph
178
188
179
189
When you want to manage Microsoft Graph, you can either do it as the application using the application permissions, or you can use delegated permissions. For delegated permissions, either the user or an administrator consents to the permissions that the app requests. The app is delegated with the permission to act as a signed-in user when it makes calls to the target resource. Application permissions are used by apps that do not require a signed in user present and thus require application permissions. Because of this, only administrators can consent to application permissions.
Copy file name to clipboardExpand all lines: articles/active-directory-b2c/user-flow-custom-attributes.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Your Azure AD B2C directory comes with a [built-in set of attributes](user-profi
29
29
30
30
The terms *extension property*, *custom attribute*, and *custom claim* refer to the same thing in the context of this article. The name varies depending on the context, such as application, object, or policy.
31
31
32
-
Azure AD B2C allows you to extend the set of attributes stored on each user account. You can also read and write these attributes by using the [Microsoft Graph API](microsoft-graph-operations.md).
32
+
Azure AD B2C allows you to extend the set of attributes stored on each user account. You can also read and write these attributes by using the [Microsoft Graph API](microsoft-graph-operations.md#application-extension-directory-extension-properties).
33
33
34
34
## Prerequisites
35
35
@@ -58,7 +58,7 @@ The custom attribute is now available in the list of **User attributes** and for
58
58
1. Select **Application claims** and then select the custom attribute.
59
59
1. Select **Save**.
60
60
61
-
Once you've created a new user using a user flow, which uses the newly created custom attribute, the object can be queried in [Microsoft Graph Explorer](https://developer.microsoft.com/graph/graph-explorer). Alternatively you can use the [Run user flow](./tutorial-create-user-flows.md) feature on the user flow to verify the customer experience. You should now see **ShoeSize** in the list of attributes collected during the sign-up journey, and see it in the token sent back to your application.
61
+
Once you've created a new user using the user flow, you can use the [Run user flow](./tutorial-create-user-flows.md) feature on the user flow to verify the customer experience. You should now see **ShoeSize** in the list of attributes collected during the sign-up journey, and see it in the token sent back to your application.
62
62
63
63
::: zone-end
64
64
@@ -144,7 +144,7 @@ You can create these attributes by using the portal UI before or after you use t
The following example demonstrates the use of custom attributes in an Azure AD B2C custom policy claim definition.
150
150
@@ -179,22 +179,22 @@ The following example demonstrates the use of a custom attribute in Azure AD B2C
179
179
180
180
## Manage extension attributes through Microsoft Graph
181
181
182
-
You can use the Microsoft Graph API to create and manage extension attributes then set the values for a user.
182
+
You can use Microsoft Graph to create and manage the custom attributes then set the values for a user. Extension attributes are also called directory or Azure AD extensions.
183
183
184
-
Extension attributes in the Microsoft Graph API are named by using the convention `extension_ApplicationClientID_attributename`, where the `ApplicationClientID` is equivalent to the **appId**but without the hyphens. For example, if the **appId** of the `b2c-extensions-app` application is `25883231-668a-43a7-80b2-5685c3f874bc` and the **attributename**is `loyaltyId`, then the extension attribute will be named `extension_25883231668a43a780b25685c3f874bc_loyaltyId`.
184
+
Custom attributes (directory extensions) in the Microsoft Graph API are named by using the convention `extension_{appId-without-hyphens}_{extensionProperty-name}` where `{appId-without-hyphens}` is the stripped version of the **appId**(called Client ID on the Azure AD B2C portal) for the `b2c-extensions-app` with only characters 0-9 and A-Z. For example, if the **appId** of the `b2c-extensions-app` application is `25883231-668a-43a7-80b2-5685c3f874bc` and the attribute name is `loyaltyId`, then the custom attribute will be named `extension_25883231668a43a780b25685c3f874bc_loyaltyId`.
185
185
186
-
Learn how to [manage extension attributes in your Azure AD B2C tenant](microsoft-graph-operations.md#application-extension-properties) using the Microsoft Graph API.
186
+
Learn how to [manage extension attributes in your Azure AD B2C tenant](microsoft-graph-operations.md#application-extension-directory-extension-properties) using the Microsoft Graph API.
187
187
188
188
## Remove extension attribute
189
189
190
-
Unlike built-in attributes, extension/custom attributes can be removed. The extension attributes' values can also be removed.
190
+
Unlike built-in attributes, custom attributes can be removed. The extension attributes' values can also be removed.
191
191
192
192
> [!Important]
193
-
> Before you remove the extension/custom attribute, for each account in the directory, set the extension attribute value to `null`. In this way you explicitly remove the extension attributes’s values. Then continue to remove the extension attribute itself. Extension/custom attribute is queryable using MS Graph API.
193
+
> Before you remove the custom attribute, for each account in the directory, set the extension attribute value to `null`. In this way you explicitly remove the extension attributes’s values. Then continue to remove the extension attribute itself. Custom attributes can be queries using Microsoft Graph API.
194
194
195
195
::: zone pivot="b2c-user-flow"
196
196
197
-
Use the following steps to remove extension/custom attribute from a user flow in your:
197
+
Use the following steps to remove a custom attribute from a user flow in your:
198
198
199
199
1. Sign in to the [Azure portal](https://portal.azure.com/) as the global administrator of your Azure AD B2C tenant.
200
200
2. Make sure you're using the directory that contains your Azure AD B2C tenant:
@@ -208,7 +208,7 @@ Use the following steps to remove extension/custom attribute from a user flow in
208
208
209
209
::: zone pivot="b2c-custom-policy"
210
210
211
-
Use the [Microsoft Graph API](microsoft-graph-operations.md#application-extension-properties) to delete the extension attribute from the application or to delete the extension attribute from the user.
211
+
Use the [Microsoft Graph API](microsoft-graph-operations.md#application-extension-directory-extension-properties) to manage the custom attributes.
212
212
213
213
::: zone-end
214
214
@@ -222,4 +222,4 @@ Follow the guidance for how to [add claims and customize user input using custom
0 commit comments