b2cIdentityUserFlow の作成

名前空間: microsoft.graph

重要

Microsoft Graph のバージョンの /beta API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 API が v1.0 で使用できるかどうかを確認するには、 バージョン セレクターを使用します。

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

アクセス許可

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

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

仕事または学校のアカウントは、次のいずれかの役割に属している必要があります。

  • 全体管理者
  • 外部 ID ユーザー Flow管理者

HTTP 要求

POST /identity/b2cUserFlows

要求ヘッダー

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

要求本文

要求本文で 、b2cIdentityUserFlow の JSON 表記を指定します

プロパティ 説明
id String 必須。 ユーザー フローの名前。 プレフィックスが要求中に名前に追加されていない場合、名前は作成後に事前に B2C_1_ 書き込みされます。
userFlowType String 必須。 作成するユーザー フローの種類。 userFlowType でサポートされる値は次のとおりです。
  • signUp
  • signIn
  • signUpOrSignIn
  • passwordReset
  • profileUpdate
  • resourceOwner
userFlowTypeVersion 浮動小数点数 必須です。 ユーザー フローのバージョン。
isLanguageCustomizationEnabled ブール値 省略可能。 言語のカスタマイズが B2C ユーザー フロー内で有効Azure ADを決定します。 言語のカスタマイズは、B2C ユーザー フロー Azure AD既定では有効になっていません。
defaultLanguageTag String 省略可能。 要求でタグが指定されていない場合に使用される b2cIdentityUserFlow の ui_locale 既定の言語を指定します。 このフィールドは RFC5646 に準拠しています。
identityProviders identityProvider コレクション 省略可能。 ユーザー フローに含める ID プロバイダー。

応答

成功した場合、このメソッドは応答コードと URI を含む Location ヘッダーを、この要求用に作成された 201 Created b2cIdentityUserFlow オブジェクトに返し、プレフィックスを名前 B2C_1_ に追加します。 失敗した場合、4xx エラーが詳細情報とともに返されます。

例 1: 既定値を使用してユーザー フローを作成する

要求

要求の例を次に示します。

POST https://graph.microsoft.com/beta/identity/b2cUserFlows
Content-type: application/json

{
    "id": "Customer",
    "userFlowType": "signUpOrSignIn",
    "userFlowTypeVersion": 3
}

応答

応答の例を次に示します。

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

HTTP/1.1 201 Created
Location: https://graph.microsoft.com/beta/identity/b2cUserFlows('B2C_1_Customer')
Content-type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#identity/b2cUserFlows/$entity",
    "id": "B2C_1_Customer",
    "userFlowType": "signUpOrSignIn",
    "userFlowTypeVersion": 3,
    "isLanguageCustomizationEnabled": false,
    "defaultLanguageTag": "en",
    "authenticationMethods": "emailWithPassword",
    "tokenClaimsConfiguration": {
        "isIssuerEntityUserFlow": false
    },
    "apiConnectorConfiguration": {}
}

例 2: 既定値と ID プロバイダーを使用してユーザー フローを作成する

要求

要求の例を次に示します。

POST https://graph.microsoft.com/beta/identity/b2cUserFlows
Location: https://graph.microsoft.com/beta/identity/b2cUserFlows('B2C_1_Customer')
Content-type: application/json

{
    "id": "Customer",
    "userFlowType": "signUpOrSignIn",
    "userFlowTypeVersion": 3,
    "identityProviders": [
        {
            "id": "Facebook-OAuth"
        }
    ]
}

応答

応答の例を次に示します。

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

HTTP/1.1 201 Created
Content-type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#identity/b2cUserFlows/$entity",
    "id": "B2C_1_Customer",
    "userFlowType": "signUpOrSignIn",
    "userFlowTypeVersion": 3,
    "isLanguageCustomizationEnabled": false,
    "defaultLanguageTag": "en",
    "authenticationMethods": "0",
    "tokenClaimsConfiguration": {
        "isIssuerEntityUserFlow": false
    },
    "apiConnectorConfiguration": {}
}

例 3: API コネクタの既定値と構成を使用してユーザー フローを作成する

要求

要求の例を次に示します。

POST https://graph.microsoft.com/beta/identity/b2cUserFlows
Content-type: application/json

{
    "id": "UserFlowWithAPIConnector",
    "userFlowType": "signUpOrSignIn",
    "userFlowTypeVersion": 1,
    "apiConnectorConfiguration":{
        "postFederationSignup":{
            "@odata.id": "{apiConnectorId}"
        },
        "postAttributeCollection":{
            "@odata.id": "{apiConnectorId}"
        }
    }
}

応答

応答の例を次に示します。

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

注: プロパティ apiConnectorConfiguration は常に ' ' 値 {} を返します。 ナビゲーション プロパティで完全な値を表示するには、この API を使用 します。

HTTP/1.1 201 Created
Location: https://graph.microsoft.com/beta/identity/b2cUserFlows/B2C_1_Partner
Content-type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#identity/b2cUserFlows/$entity",
    "id": "B2C_1_UserFlowWithAPIConnector",
    "userFlowType": "signUpOrSignIn",
    "userFlowTypeVersion": 1,
    "apiConnectorConfiguration": {}
}