Create userAttributeAssignments

名前空間: microsoft.graph

b2cIdentityUserFlowに新しい identityUserFlowAttributeAssignment オブジェクトを作成します。

アクセス許可

この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可」を参照してください。

アクセス許可の種類 アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校のアカウント) IdentityUserFlow.ReadWrite.All
委任 (個人用 Microsoft アカウント) サポートされていません
アプリケーション IdentityUserFlow.ReadWrite.All

HTTP 要求

POST /identity/b2cUserFlows/{id}/userAttributeAssignments

要求ヘッダー

名前 説明
Authorization ベアラー {token}。必須。
Content-Type application/json. Required.

要求本文

要求本文で 、identityUserFlowAttributeAssignment オブジェクトの JSON 表記を指定します。

次の表に 、identityUserFlowAttributeAssignmentを作成するときに必要なプロパティを示します。

プロパティ 説明
displayName 文字列 ユーザー フロー内の identityUserFlowAttribute の表示名。
isOptional ブール値 identityUserFlowAttribute が省略可能かどうかを指定します。 true つまり、ユーザーは値を指定する必要がな false つまり、ユーザーは値を指定せずにサインアップを完了できません。
requiresVerification ブール値 identityUserFlowAttribute が検証を必要とするかどうかを決定します。 これは、ユーザーの電話番号または電子メール アドレスの確認にのみ使用されます。
userAttributeValues userAttributeValuesItem コレクション ユーザー フロー属性の入力オプション。 userInputType が 、 、または radioSingleSelect である dropdownSingleSelect 場合にのみ適用されます checkboxMultiSelect
userInputType identityUserFlowAttributeInputType ユーザー フロー属性の入力の種類。 使用可能な値: textBoxdateTimeDropdownradioSingleSelectdropdownSingleSelectemailBoxcheckboxMultiSelect
userAttribute identityUserFlowAttribute ユーザー フローの割り当てに含めるユーザー フロー属性の識別子。

応答

成功した場合、このメソッドは応答コードと、応答本文の 201 Created identityUserFlowAttributeAssignment オブジェクトを返します。

要求

POST https://graph.microsoft.com/beta/identity/b2cUserFlows/B2C_1_Consumer/userAttributeAssignments
Content-Type: application/json

{
    "isOptional": false,
    "requiresVerification": false,
    "userInputType": "TextBox",
    "displayName": "Shoe size",
    "userAttributeValues": [],
    "userAttribute": {
        "id": "extension_guid_shoeSize"
    }
}

応答

注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。

HTTP/1.1 201 Created
Location: https://graph.microsoft.com/beta/identity/b2xUserFlows/B2C_1_Consumer/userAttributeAssignments/extension_guid_shoeSize
Content-Type: application/json

{
    "id": "extension_guid_shoeSize",
    "isOptional": false,
    "requiresVerification": false,
    "userInputType": "TextBox",
    "displayName": "Shoe size",
    "userAttributeValues": []
}