Skip to content

Commit

Permalink
Merge pull request #9109 from yukieryu/patch-2
Browse files Browse the repository at this point in the history
Updating parameters required to create a local B2C identity
  • Loading branch information
Lauragra authored Feb 13, 2024
2 parents 9a7723b + 1f14d68 commit ec76db6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
10 changes: 5 additions & 5 deletions api-reference/beta/api/user-post-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ POST /users

In the request body, supply a JSON representation of [user](../resources/user.md) object.

The following table lists the properties that are required when you create a user. If you're including an **identities** property for the user you're creating, not all the properties listed are required. For a [B2C local account identity](../resources/objectidentity.md), only **passwordProfile** is required, and **passwordPolicies** must be set to `DisablePasswordExpiration`. For a social identity, none of the properties are required.
The following table lists the properties that are required when you create a user. If you're including an **identities** property for the user you're creating, not all the properties listed are required. For a social identity, none of the properties are required.

| Parameter | Type | Description|
|:---------------|:--------|:----------|
|accountEnabled |Boolean |True if the account is enabled; otherwise, false.|
|displayName |string |The name to display in the address book for the user.|
|onPremisesImmutableId |string |Only needs to be specified when creating a new user account if you are using a federated domain for the user's userPrincipalName (UPN) property.|
|mailNickname |string |The mail alias for the user.|
|displayName |String |The name to display in the address book for the user.|
|onPremisesImmutableId |String |Required only when creating a new user account if you are using a federated domain for the user's **userPrincipalName** (UPN) property.|
|mailNickname |String |The mail alias for the user.|
|passwordProfile|[PasswordProfile](../resources/passwordprofile.md) |The password profile for the user.|
|userPrincipalName |string |The user principal name (someuser@contoso.com). It's an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant's collection of verified domains. The verified domains for the tenant can be accessed from the **verifiedDomains** property of [organization](../resources/organization.md). <br>NOTE: This property cannot contain accent characters. Only the following characters are allowed `A - Z`, `a - z`, `0 - 9`, ` ' . - _ ! # ^ ~`. For the complete list of allowed characters, see [username policies](/azure/active-directory/authentication/concept-sspr-policy#userprincipalname-policies-that-apply-to-all-user-accounts).|
|userPrincipalName |String |The user principal name (someuser@contoso.com). It's an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant's collection of verified domains. The verified domains for the tenant can be accessed from the **verifiedDomains** property of [organization](../resources/organization.md). <br>NOTE: This property cannot contain accent characters. Only the following characters are allowed `A - Z`, `a - z`, `0 - 9`, ` ' . - _ ! # ^ ~`. For the complete list of allowed characters, see [username policies](/azure/active-directory/authentication/concept-sspr-policy#userprincipalname-policies-that-apply-to-all-user-accounts).|

Because the **user** resource supports [extensions](/graph/extensibility-overview), you can use the `POST` operation and add custom properties with your own data to the user instance while creating it.

Expand Down
24 changes: 13 additions & 11 deletions api-reference/v1.0/api/user-post-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,21 @@ POST /users

In the request body, supply a JSON representation of [user](../resources/user.md) object.

The following table lists the properties that are required when you create a user. If you're including an **identities** property for the user you're creating, not all the properties listed are required. For a [B2C local account identity](../resources/objectidentity.md), only **passwordProfile** is required, and **passwordPolicies** must be set to `DisablePasswordExpiration`. For a social identity, none of the properties are required.
The following table lists the properties that are required when you create a user. If you're including an **identities** property for the user you're creating, not all the properties listed are required. For a social identity, none of the properties are required.

| Parameter | Type | Description|
|:---------------|:--------|:----------|
|accountEnabled |boolean |true if the account is enabled; otherwise, false.|
|displayName |string |The name to display in the address book for the user.|
|onPremisesImmutableId |string |Only needs to be specified when creating a new user account if you are using a federated domain for the user's userPrincipalName (UPN) property.|
|mailNickname |string |The mail alias for the user.|
|accountEnabled |Boolean |true if the account is enabled; otherwise, false.|
|displayName |String |The name to display in the address book for the user.|
|onPremisesImmutableId |String |Required only when creating a new user account if you are using a federated domain for the user's **userPrincipalName** (UPN) property.|
|mailNickname |String |The mail alias for the user.|
|passwordProfile|[PasswordProfile](../resources/passwordprofile.md) |The password profile for the user. |
|userPrincipalName |string |The user principal name (someuser@contoso.com). It's an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant's collection of verified domains. The verified domains for the tenant can be accessed from the **verifiedDomains** property of [organization](../resources/organization.md). <br>NOTE: This property cannot contain accent characters. Only the following characters are allowed `A - Z`, `a - z`, `0 - 9`, ` ' . - _ ! # ^ ~`. For the complete list of allowed characters, see [username policies](/azure/active-directory/authentication/concept-sspr-policy#userprincipalname-policies-that-apply-to-all-user-accounts).|
|userPrincipalName |String |The user principal name (someuser@contoso.com). It's an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant's collection of verified domains. The verified domains for the tenant can be accessed from the **verifiedDomains** property of [organization](../resources/organization.md). <br>NOTE: This property cannot contain accent characters. Only the following characters are allowed `A - Z`, `a - z`, `0 - 9`, ` ' . - _ ! # ^ ~`. For the complete list of allowed characters, see [username policies](/azure/active-directory/authentication/concept-sspr-policy#userprincipalname-policies-that-apply-to-all-user-accounts).|

Because the **user** resource supports [extensions](/graph/extensibility-overview), you can use the `POST` operation and add custom properties with your own data to the user instance while creating it.

>[!NOTE]
>Federated users created using this API will be forced to sign-in every 12 hours by default. For more information on how to change this, see [Exceptions for token lifetimes](/azure/active-directory/develop/active-directory-configurable-token-lifetimes#exceptions).
> [!NOTE]
> Federated users created via this API are forced to sign in every 12 hours by default. For information about how to change this, see [Exceptions for token lifetimes](/azure/active-directory/develop/active-directory-configurable-token-lifetimes#exceptions).
## Response

Expand All @@ -72,7 +72,7 @@ If successful, this method returns `201 Created` response code and [user](../res

#### Request

Here is an example of the request.
The following example shows a request.

# [HTTP](#tab/http)
<!-- {
Expand Down Expand Up @@ -134,7 +134,9 @@ In the request body, supply a JSON representation of [user](../resources/user.md

#### Response

Here is an example of the response. Note: The response object shown here might be shortened for readability.
The following example shows the response.

>**Note:** The response object shown here might be shortened for readability.
<!-- {
"blockType": "response",
"truncated": true,
Expand Down Expand Up @@ -244,7 +246,7 @@ Content-type: application/json

#### Response

Here is an example of the response.
The following example shows the response.

> **Note:** The response object shown here might be shortened for readability.
Expand Down

0 comments on commit ec76db6

Please sign in to comment.