Create identityUserFlowAttribute

Namespace: microsoft.graph

Create a new identityUserFlowAttribute object.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) IdentityUserFlow.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application IdentityUserFlow.ReadWrite.All

The work or school account needs to belong to one of the following roles:

  • Global administrator
  • External Identity User Flow Attribute administrator

HTTP request

POST /identity/userFlowAttributes

Request headers

Name Description
Authorization Bearer {token}. Required.
Content-Type application/json. Required.

Request body

In the request body, provide a JSON representation of identityUserFlowAttribute.

Property Type Description
id String The identifier of the user flow attribute. This is a read-only attribute that is automatically created.
displayName String The display name of the user flow attribute.
description String The description of the user flow attribute. It's shown to the user at the time of sign-up.
userFlowAttributeType String The type of the user flow attribute. This is a read-only attribute that is automatically set. Depending on the type of attribute, the values for this property will be builtIn or custom.
dataType String The data type of the user flow attribute. This cannot be modified once the custom user flow attribute is created. The supported values for dataType are:
  • string
  • boolean
  • int64

Response

If successful, this method returns a 201 Created response code and identityUserFlowAttribute object in the response body. If unsuccessful, a 4xx error will be returned with specific details.

Examples

Request

The following is an example of the request.

POST https://graph.microsoft.com/v1.0/identity/userFlowAttributes
Content-type: application/json

{
  "displayName": "Hobby",
  "description": "Your hobby",
  "dataType": "string",
}

Response

The following is an example of the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Location: https://graph.microsoft.com/v1.0/identity/userFlowAttributes/extension_7a95ecd9489b4fb9a45722b913c4703b_Hobby
Content-type: application/json

{
    "id": "extension_d09380e2b4c642b9a203fb816a04a7ad_Hobby",
    "displayName": "Hobby",
    "description": "Your hobby",
    "userFlowAttributeType": "custom",
    "dataType": "string"
}