本人確認のために Azure Active Directory B2C に Bluink eID-Me を構成する

開始する前に

Azure Active Directory B2C (Azure AD B2C) には、ユーザーがアプリケーションを操作する方法を定義する 2 つの方法 (定義済みのユーザー フローを使用する、または構成可能なカスタム ポリシーを使用する) があります。 カスタム ポリシーは、複雑なシナリオに対応します。 ほとんどのシナリオでは、組み込みのユーザー フローを使用することをお勧めします。 「ユーザー フローとカスタム ポリシーの概要」を参照してください

Azure AD B2C 認証と eID-Me を統合する

Azure AD B2C 認証を Bluink eID-Me と統合する方法について説明します。Bluink eID-Me は、カナダ国民向けの本人確認と分散型デジタル ID のソリューションです。 eID-Me を使用すると、Azure AD B2C テナントは、ユーザー ID を検証し、検証済みのサインアップおよびサインイン ID 要求を取得します。 統合により、セキュリティで保護されたデジタル ID による多要素認証とパスワードレス サインインがサポートされ、 組織は、ID 保証レベル (IAL) 2 と Know Your Customer (KYC) の要件を満たすことができます。

詳細については、bluink.ca (Bluink Ltd) を参照してください

前提条件

開始するには、以下が必要です。

また、「チュートリアル: Azure Active Directory B2C でユーザー フローとカスタム ポリシーを作成する」も参照してください。

シナリオの説明

eID-Me は、OpenID Connect (OIDC) ID プロバイダーとして Azure AD B2C と統合します。 Azure AD B2C を使用した eID-Me ソリューションを構成するコンポーネントは次のとおりです。

  • Azure AD B2C テナント - eID-Me での証明書利用者として構成すると、eID-Me ID により、サインアップとサインインで Azure AD B2C テナントを信頼できるようになります
  • Azure AD B2C テナント アプリケーション - テナントには Azure AD B2C テナント アプリケーションが必要であることを前提とします
    • アプリケーションは、トランザクション中に Azure AD B2C によって受信された ID 要求を受信します
  • eID-Me スマートフォン アプリ - Azure AD B2C テナント ユーザーには、iOS または Android 用のアプリが必要です
  • 発行された eID-Me デジタル ID - eID-Me の ID プルーフィングから発行されたもの
    • ユーザーのデジタル ID は、アプリ内のデジタル ウォレットに発行されます。 有効な ID ドキュメントが必要です。

eID-Me アプリでは、トランザクション中にユーザーを認証します。 eID-Me デジタル ID に含まれるプライベート署名キーを使用する X509 公開キー認証では、パスワードレス MFA が提供されます。

Azure AD B2C フローの外部で発生する eID-Me の ID プルーフィングを次の図に示します。

eID-Me での ID プルーフィング フローの図。

  1. ユーザーが、自撮り写真を eID-Me スマートフォン アプリケーションにアップロードします。
  2. ユーザーが、パスポートや運転免許証などの政府発行の身元確認書類をスキャンして、eID-Me スマートフォン アプリケーションにアップロードします。
  3. eID-Me により、検証のためにデータが ID サービスに送信されます。
  4. ユーザーにデジタル ID が発行され、アプリケーションに保存されます。

次の図は、Azure AD B2C と eID-Me の統合を示しています。

Azure AD B2C と eID-Me の統合の図。

  1. ユーザーが Azure AD B2C のサインイン ページを開き、ユーザー名でサインインまたはサインアップします。
  2. ユーザーが、Azure AD B2C サインインおよびサインアップ ポリシーに転送されます。
  3. Azure AD B2C によって、ユーザーが、OIDC 承認コード フローを使用する eID-Me ID ルーターにリダイレクトされます。
  4. ルーターによって、認証と認可の要求の詳細を含むプッシュ通知がユーザーのモバイル アプリに送信されます。
  5. ユーザー認証チャレンジが表示され、ID 要求のプロンプトが表示されます。
  6. チャレンジ応答がルーターに送信されます。
  7. ルーターからの応答として、認証結果が Azure AD B2C に送信されます。
  8. Azure AD B2C からの応答として、ID トークンがアプリケーションに送信されます。
  9. ユーザーは、アクセスを許可または拒否されます。

eID-Me の使用を開始する

bluink.ca の [お問い合わせ] ページに移動し、テストまたは運用環境を構成し、Azure AD B2C テナントを証明書利用者として設定することを目的としたデモを要求します。 テナントは、eID-Me を使用してサインアップするコンシューマーに必要な ID 要求を決定します。

eID-Me でアプリケーションを構成する

eID-Me で eID-ME 証明書利用者としてテナント アプリケーションを構成するには、次の情報を提供します。

プロパティ 説明
名前 Azure AD B2C または別のアプリケーション名
Domain name.onmicrosoft.com
リダイレクト URI https://jwt.ms
リダイレクト URI https://your-B2C-tenant-name.b2clogin.com/your-B2C-tenant-name.onmicrosoft.com/oauth2/authresp
たとえば: https://fabrikam.b2clogin.com/fabrikam.onmicrosoft.com/oauth2/authresp
カスタム ドメインの場合、https://your-domain-name/your-tenant-name.onmicrosoft.com/oauth2/authresp. を入力します
アプリケーションのホーム ページの URL エンド ユーザーに表示されます
アプリケーションのプライバシーポリシーの URL エンド ユーザーに表示されます

Note

証明書利用者が構成されると、eID-Me からクライアント ID とクライアント シークレットが提供されます。 Azure AD B2C で ID プロバイダー(IdP) を構成するために、クライアント ID とクライアント シークレットをメモします。

Azure AD B2C で新しい ID プロバイダーを追加する

次の手順では、Azure AD B2C テナントでディレクトリを使用します。

  1. Azure AD B2C テナントの全体管理者として、Azure portal にサインインします。
  2. 上部のメニューで、[ディレクトリとサブスクリプション] を選択します。
  3. テナントを含むディレクトリを選択します。
  4. Azure portal の左上にある [すべてのサービス] を選択します。
  5. Azure AD B2C を検索して選択します。
  6. [ダッシュボード]>[Azure Active Directory B2C]>[ID プロバイダー] の順に移動します。
  7. [新しい OpenID Connect プロバイダー] を選択します。
  8. [追加] を選択します。

ID プロバイダーの構成

ID プロバイダーを構成するには、次の手順を行います。

  1. [ID プロバイダーの種類]>[OpenID Connect] の順に選択します。
  2. ID プロバイダー フォームの [名前] に、「eID-Me Passwordless」と入力するか、別の名前を入力します。
  3. [クライアント ID] に、eID-Me から提供されたクライアント ID を入力します。
  4. [クライアント シークレット] に、eID-Me から提供されたクライアント シークレットを入力します。
  5. [スコープ] で、[OpenID 電子メール プロファイル] を選択します。
  6. [応答の種類] で、[code] (コード) を選択します。
  7. [応答モード] で、[フォーム ポスト] を選択します。
  8. [OK] を選択します。
  9. [Map this identity provider's claims] を選択します。
  10. [ユーザー ID] には、sub を使用します。
  11. [表示名] には、name を使用します。
  12. [指定された名前] には、given_name を使用します。
  13. [姓] には、family_name を使用します。
  14. [電子メール] には、email を使用します。
  15. [保存] を選択します。

Multi-Factor Authentication の構成

eID-Me は多要素認証システムであるため、ユーザー フローの多要素認証構成は必要ありません。

ユーザー フロー ポリシーの作成

次の手順では、eID-Me は B2C ID プロバイダーの新しい OIDC ID プロバイダーとして表示されています。

  1. Azure AD B2C テナントの [ポリシー] で、[ユーザー フロー] を選択します。
  2. [新しいユーザー フロー] を選択します。
  3. [サインアップとサインイン]>[バージョン]>[作成] を選択します。
  4. ポリシーの [名前] を入力します。
  5. [ID プロバイダー] で、作成した eID-Me ID プロバイダーを選択します。
  6. [ローカル アカウント] で、[なし] を選択します。 この選択により、メールとパスワードベースの認証が無効になります。
  7. [ユーザー フローを実行します] を選択します。
  8. [返信 URL] を入力します (例: https://jwt.ms)。
  9. ブラウザーが eID-Me のサインイン ページにリダイレクトされます。
  10. ユーザー登録のアカウント名を入力します。
  11. ユーザーは、eID-Me を使用してモバイル デバイスでプッシュ通知を受け取ります。
  12. 認証チャレンジが表示されます。
  13. チャレンジが受け入れられ、ブラウザーが返信 URL にリダイレクトされます。

Note

Azure Active Directory B2C (Azure AD B2C) には、ユーザーがアプリケーションを操作する方法を定義する 2 つの方法 (定義済みのユーザー フローを使用する、または構成可能なカスタム ポリシーを使用する) があります。 カスタム ポリシーは、複雑なシナリオに対応します。 ほとんどのシナリオでは、組み込みのユーザー フローを使用することをお勧めします。 「ユーザー フローとカスタム ポリシーの概要」を参照してください

ポリシー キーを作成する

記録したクライアント シークレットを Azure AD B2C テナントに格納します。 次の手順では、Azure AD B2C テナントでディレクトリを使用します。

  1. Azure portal にサインインします。
  2. ポータルのツール バーで、[ディレクトリとサブスクリプション] を選択します。
  3. ポータルの [設定]、[ディレクトリとサブスクリプション] ページにある [ディレクトリ名] の一覧で、お使いの Azure AD B2C ディレクトリを見つけます。
  4. [切り替え] を選択します。
  5. Azure portal の左上にある [すべてのサービス] を選択します。
  6. Azure AD B2C を検索して選択します。
  7. [概要] ページで、 [Identity Experience Framework] を選択します。
  8. [ポリシー キー] を選択します。
  9. [追加] を選択します。
  10. [オプション] では、 [手動] を選びます。
  11. ポリシー キーの名前を入力します。 たとえば、「 eIDMeClientSecret 」のように入力します。 プレフィックス B2C_1A_ がキー名に追加されます。
  12. [シークレット] に、メモしたクライアント シークレットを入力します。
  13. [キー使用法] には [署名] を選択します。
  14. [作成] を選択します

eID-Me を ID プロバイダーとして構成する

ユーザーが eID-Me を使用してサインインできるようにするには、eID-Me を ID プロバイダーとして定義します。 Azure AD B2C はエンドポイントを介して eID-Me と通信します。 エンドポイントは、デバイス上のデジタル ID を使用してユーザー認証を検証するために Azure AD B2C によって使用される要求を提供します。

eID-Me をクレーム プロバイダーとして定義するには、ポリシー拡張ファイルの ClaimsProvider 要素に eID-Me を追加します。

  1. TrustFrameworkExtensions.xml を開きます。

  2. ClaimsProviders 要素を見つけます。 この要素が表示されない場合は、ルート要素の下に追加します。

  3. 新しい ClaimsProvider を追加します。

       <ClaimsProvider>
       <Domain>eID-Me</Domain>
       <DisplayName>eID-Me</DisplayName>
       <TechnicalProfiles>
         <TechnicalProfile Id="eID-Me-OIDC">
           <!-- The text in the following DisplayName element is shown to the user on the claims provider 
    selection screen. -->
           <DisplayName>eID-Me for Sign In</DisplayName>
           <Protocol Name="OpenIdConnect" />
           <Metadata>
             <Item Key="ProviderName">https://eid-me.bluink.ca</Item>
             <Item Key="METADATA">https://demoeid.bluink.ca/.well-known/openid-configuration</Item>
             <Item Key="response_types">code</Item>
             <Item Key="scope">openid email profile</Item>
             <Item Key="response_mode">form_post</Item>
             <Item Key="HttpBinding">POST</Item>
             <Item Key="token_endpoint_auth_method">client_secret_post</Item>
             <Item Key="client_id">eid_me_rp_client_id</Item>
             <Item Key="UsePolicyInRedirectUri">false</Item>
           </Metadata>
           <CryptographicKeys>
             <Key Id="client_secret" StorageReferenceId="B2C_1A_eIDMeClientSecret" />
           </CryptographicKeys>
           <InputClaims />
           <OutputClaims>
             <OutputClaim ClaimTypeReferenceId="issuerUserId" PartnerClaimType="sub" />
             <OutputClaim ClaimTypeReferenceId="tenantId" PartnerClaimType="tid" />
             <OutputClaim ClaimTypeReferenceId="givenName" PartnerClaimType="given_name" />
             <OutputClaim ClaimTypeReferenceId="surName" PartnerClaimType="family_name" />
             <OutputClaim ClaimTypeReferenceId="displayName" PartnerClaimType="name" />
             <OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="email" />
             <OutputClaim ClaimTypeReferenceId="IAL" PartnerClaimType="identity_assurance_level_achieved" DefaultValue="unknown IAL" />
             <OutputClaim ClaimTypeReferenceId="authenticationSource" DefaultValue="socialIdpAuthentication" AlwaysUseDefaultValue="true" />
             <OutputClaim ClaimTypeReferenceId="identityProvider" PartnerClaimType="iss" />
             <OutputClaim ClaimTypeReferenceId="locality" PartnerClaimType="locality" DefaultValue="unknown locality" />
             <OutputClaim ClaimTypeReferenceId="region" PartnerClaimType="region" DefaultValue="unknown region" />
           </OutputClaims>
           <OutputClaimsTransformations>
             <OutputClaimsTransformation ReferenceId="CreateRandomUPNUserName" />
             <OutputClaimsTransformation ReferenceId="CreateUserPrincipalName" />
             <OutputClaimsTransformation ReferenceId="CreateAlternativeSecurityId" />
             <OutputClaimsTransformation ReferenceId="CreateSubjectClaimFromAlternativeSecurityId" />
           </OutputClaimsTransformations>
           <UseTechnicalProfileForSessionManagement ReferenceId="SM-SocialLogin" />
         </TechnicalProfile>
       </TechnicalProfiles>
     </ClaimsProvider>
    
  4. eid_me_rp_client_id に、eID-Me 証明書利用者のクライアント ID を入力します。

  5. [保存] を選択します。

サポートされる ID 要求

eID-Me でサポートされる ID 要求をさらに追加できます。

  1. TrustFrameworksExtension.xml を開きます。
  2. BuildingBlocks 要素を見つけます。

Note

サポートされる eID-Me ID 要求の一覧については、well-known/openid-configuration に掲載されている OIDC 識別子を含む OID リポジトリを参照してください。

<BuildingBlocks>
<ClaimsSchema>
 <ClaimType Id="IAL">
     <DisplayName>Identity Assurance Level</DisplayName>
     <DataType>string</DataType>
     <DefaultPartnerClaimTypes>
       <Protocol Name="OpenIdConnect" PartnerClaimType="identity_assurance_level_achieved" />
     </DefaultPartnerClaimTypes>
     <AdminHelpText>The Identity Assurance Level Achieved during proofing of the digital identity.</AdminHelpText>
     <UserHelpText>The Identity Assurance Level Achieved during proofing of the digital identity.</UserHelpText>
     <UserInputType>Readonly</UserInputType>
   </ClaimType>

<ClaimType Id="picture">
     <DisplayName>Portrait Photo</DisplayName>
     <DataType>string</DataType>
     <DefaultPartnerClaimTypes>
       <Protocol Name="OpenIdConnect" PartnerClaimType="thumbnail_portrait" />
     </DefaultPartnerClaimTypes>
     <AdminHelpText>The portrait photo of the user.</AdminHelpText>
     <UserHelpText>Your portrait photo.</UserHelpText>
     <UserInputType>Readonly</UserInputType>
   </ClaimType>

 <ClaimType Id="middle_name">
     <DisplayName>Portrait Photo</DisplayName>
     <DataType>string</DataType>
     <DefaultPartnerClaimTypes>
       <Protocol Name="OpenIdConnect" PartnerClaimType="middle_name" />
     </DefaultPartnerClaimTypes>
     <UserHelpText>Your middle name.</UserHelpText>
     <UserInputType>TextBox</UserInputType>
   </ClaimType>

<ClaimType Id="birthdate">
     <DisplayName>Date of Birth</DisplayName>
     <DataType>string</DataType>
     <DefaultPartnerClaimTypes>
       <Protocol Name="OpenIdConnect" PartnerClaimType="birthdate" />
     </DefaultPartnerClaimTypes>
     <AdminHelpText>The user's date of birth.</AdminHelpText>
     <UserHelpText>Your date of birth.</UserHelpText>
     <UserInputType>TextBox</UserInputType>
   </ClaimType>

 <ClaimType Id="gender">
     <DisplayName>Gender</DisplayName>
     <DataType>string</DataType>
     <DefaultPartnerClaimTypes>
       <Protocol Name="OpenIdConnect" PartnerClaimType="gender" />
     </DefaultPartnerClaimTypes>
     <AdminHelpText>The user's gender.</AdminHelpText>
     <UserHelpText>Your gender.</UserHelpText>
     <UserInputType>TextBox</UserInputType>
   </ClaimType>
 
 <ClaimType Id="street_address">
     <DisplayName>Locality/City</DisplayName>
     <DataType>string</DataType>
     <DefaultPartnerClaimTypes>
       <Protocol Name="OpenIdConnect" PartnerClaimType="street_address" />
     </DefaultPartnerClaimTypes>
     <AdminHelpText>The user's full street address, which MAY include house number, street name, post office box.</AdminHelpText>
     <UserHelpText>Your street address of residence.</UserHelpText>
     <UserInputType>TextBox</UserInputType>
   </ClaimType>

<ClaimType Id="locality">
     <DisplayName>Locality/City</DisplayName>
     <DataType>string</DataType>
     <DefaultPartnerClaimTypes>
       <Protocol Name="OpenIdConnect" PartnerClaimType="locality" />
     </DefaultPartnerClaimTypes>
     <AdminHelpText>The user's current city or locality of residence.</AdminHelpText>
     <UserHelpText>Your current city or locality of residence.</UserHelpText>
     <UserInputType>TextBox</UserInputType>
   </ClaimType>

   <ClaimType Id="region">
     <DisplayName>Province or Territory</DisplayName>
     <DataType>string</DataType>
     <DefaultPartnerClaimTypes>
       <Protocol Name="OpenIdConnect" PartnerClaimType="region" />
     </DefaultPartnerClaimTypes>
     <AdminHelpText>The user's current province or territory of residence.</AdminHelpText>
     <UserHelpText>Your current province or territory of residence.</UserHelpText>
     <UserInputType>TextBox</UserInputType>
   </ClaimType>

   <ClaimType Id="country">
     <DisplayName>Country</DisplayName>
     <DataType>string</DataType>
     <DefaultPartnerClaimTypes>
       <Protocol Name="OpenIdConnect" PartnerClaimType="country" />
     </DefaultPartnerClaimTypes>
     <AdminHelpText>The user's current country of residence.</AdminHelpText>
     <UserHelpText>Your current country of residence.</UserHelpText>
     <UserInputType>TextBox</UserInputType>
   </ClaimType>

   <ClaimType Id="dl_number">
     <DisplayName>Driver's Licence Number</DisplayName>
     <DataType>string</DataType>
     <DefaultPartnerClaimTypes>
       <Protocol Name="OpenIdConnect" PartnerClaimType="dl_number" />
     </DefaultPartnerClaimTypes>
     <AdminHelpText>The user's driver's licence number.</AdminHelpText>
     <UserHelpText>Your driver's licence number.</UserHelpText>
     <UserInputType>TextBox</UserInputType>
   </ClaimType>

   <ClaimType Id="dl_class">
     <DisplayName>Driver's Licence Class</DisplayName>
     <DataType>string</DataType>
     <DefaultPartnerClaimTypes>
       <Protocol Name="OpenIdConnect" PartnerClaimType="dl_class" />
     </DefaultPartnerClaimTypes>
     <AdminHelpText>The user's driver's licence class.</AdminHelpText>
     <UserHelpText>Your driver's licence class.</UserHelpText>
     <UserInputType>TextBox</UserInputType>
   </ClaimType>
 </ClaimsSchema>

ユーザー体験を追加する

次の手順では、ID プロバイダーは設定されていますが、サインイン ページでは設定されていません。 カスタム ユーザー体験がない場合は、テンプレート ユーザー体験をコピーします。

  1. スターター パックの TrustFrameworkBase.xml ファイルを開きます。
  2. ID=SignUpOrSignIn を含む UserJourneys 要素を見つけて、その内容をコピーします。
  3. TrustFrameworkExtensions.xml を開きます。
  4. UserJourneys 要素を見つけます。 この要素が見つからない場合は追加します。
  5. UserJourney 要素の内容を UserJourneys 要素の子として貼り付けます。
  6. ユーザー体験 ID の名前を変更します (例: ID=CustomSignUpSignIn)。

ユーザー体験に ID プロバイダーを追加する

新しい ID プロバイダーをユーザー体験に追加します。

  1. ユーザー体験で、Type=CombinedSignInAndSignUp または Type=ClaimsProviderSelection を含むオーケストレーション ステップ要素を見つけます。 これは通常、最初のオーケストレーション ステップです。 ClaimsProviderSelections 要素には、ユーザーのサインインに使用する ID プロバイダーの一覧が含まれています。 要素の順序により、ユーザーに表示されるサインイン ボタンの順序が制御されます。
  2. ClaimsProviderSelection XML 要素を追加します。
  3. TargetClaimsExchangeId の値をフレンドリ名に設定します。
  4. 次のオーケストレーション ステップで、ClaimsExchange 要素を追加します。
  5. Id を、ターゲットの要求交換 ID の値に設定します。
  6. TechnicalProfileReferenceId の値を、作成した技術プロファイルの ID に更新します。

次の XML は、ID プロバイダーを使用したユーザー体験の 7 つのオーケストレーション ステップを示しています。

 <UserJourney Id="eIDME-SignUpOrSignIn">
   <OrchestrationSteps>
     <OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">
       <ClaimsProviderSelections>
         <ClaimsProviderSelection TargetClaimsExchangeId="eIDMeExchange" />
        </ClaimsProviderSelections>
   </OrchestrationStep>
     <!-- Check if the user has selected to sign in using one of the social providers -->
     <OrchestrationStep Order="2" Type="ClaimsExchange">
       <Preconditions>
         <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
           <Value>objectId</Value>
           <Action>SkipThisOrchestrationStep</Action>
         </Precondition>
       </Preconditions>
       <ClaimsExchanges>
         <ClaimsExchange Id="eIDMeExchange" TechnicalProfileReferenceId="eID-Me-OIDC" />
       </ClaimsExchanges>
     </OrchestrationStep>
     <!-- For social IDP authentication, attempt to find the user account in the directory. -->
     <OrchestrationStep Order="3" Type="ClaimsExchange">
       <Preconditions>
         <Precondition Type="ClaimEquals" ExecuteActionsIf="true">
           <Value>authenticationSource</Value>
           <Value>localAccountAuthentication</Value>
           <Action>SkipThisOrchestrationStep</Action>
         </Precondition>
       </Preconditions>
       <ClaimsExchanges>
         <ClaimsExchange Id="AADUserReadUsingAlternativeSecurityId" TechnicalProfileReferenceId="AAD-UserReadUsingAlternativeSecurityId-NoError" />
       </ClaimsExchanges>
     </OrchestrationStep>
     <!-- Show self-asserted page only if the directory does not have the user account already (i.e. we do not have an objectId).  -->
     <OrchestrationStep Order="4" Type="ClaimsExchange">
       <Preconditions>
         <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
           <Value>objectId</Value>
           <Action>SkipThisOrchestrationStep</Action>
         </Precondition>
       </Preconditions>
       <ClaimsExchanges>
         <ClaimsExchange Id="SelfAsserted-Social" TechnicalProfileReferenceId="SelfAsserted-Social" />
       </ClaimsExchanges>
     </OrchestrationStep>
     <!-- This step reads any user attributes that we may not have received when authenticating using ESTS so they can be sent in the token. -->
     <OrchestrationStep Order="5" Type="ClaimsExchange">
       <Preconditions>
         <Precondition Type="ClaimEquals" ExecuteActionsIf="true">
           <Value>authenticationSource</Value>
           <Value>socialIdpAuthentication</Value>
           <Action>SkipThisOrchestrationStep</Action>
         </Precondition>
       </Preconditions>
       <ClaimsExchanges>
         <ClaimsExchange Id="AADUserReadWithObjectId" TechnicalProfileReferenceId="AAD-UserReadUsingObjectId" />
       </ClaimsExchanges>
     </OrchestrationStep>
     <!-- The previous step (SelfAsserted-Social) could have been skipped if there were no attributes to collect 
          from the user. So, in that case, create the user in the directory if one does not already exist 
          (verified using objectId which would be set from the last step if account was created in the directory. -->
     <OrchestrationStep Order="6" Type="ClaimsExchange">
       <Preconditions>
         <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
           <Value>objectId</Value>
           <Action>SkipThisOrchestrationStep</Action>
         </Precondition>
       </Preconditions>
       <ClaimsExchanges>
         <ClaimsExchange Id="AADUserWrite" TechnicalProfileReferenceId="AAD-UserWriteUsingAlternativeSecurityId" />
       </ClaimsExchanges>
     </OrchestrationStep>
     <OrchestrationStep Order="7" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JwtIssuer" />
   </OrchestrationSteps>
   <ClientDefinition ReferenceId="DefaultWeb" />
 </UserJourney>

証明書利用者ポリシーを構成する

証明書利用者ポリシーは、Azure AD B2C が実行されるユーザー体験を指定します。 アプリケーションに渡される要求を制御できます。 eID-Me-OIDC-Signup TechnicalProfile 要素の OutputClaims 要素を調整します。 次のサンプルでは、アプリケーションはユーザーの郵便番号、地域、地区、IAL、肖像写真、ミドル ネーム、生年月日を受信します。 アカウントが作成されているかどうかを示すブール型の signupConditionsSatisfied 要求を受信します。

 <RelyingParty>
     <DefaultUserJourney ReferenceId="eIDMe-SignUpOrSignIn" />
     <TechnicalProfile Id="PolicyProfile">
       <DisplayName>PolicyProfile</DisplayName>
       <Protocol Name="OpenIdConnect" />
       <OutputClaims>
         <OutputClaim ClaimTypeReferenceId="displayName" />
         <OutputClaim ClaimTypeReferenceId="givenName" />
         <OutputClaim ClaimTypeReferenceId="surname" />
         <OutputClaim ClaimTypeReferenceId="email" />
         <OutputClaim ClaimTypeReferenceId="objectId" PartnerClaimType="sub"/>
         <OutputClaim ClaimTypeReferenceId="identityProvider" />
         <OutputClaim ClaimTypeReferenceId="tenantId" AlwaysUseDefaultValue="true" DefaultValue="{Policy:TenantObjectId}" />
         <OutputClaim ClaimTypeReferenceId="postalCode" PartnerClaimType="postal_code" DefaultValue="unknown postal_code" />
         <OutputClaim ClaimTypeReferenceId="locality" PartnerClaimType="locality" DefaultValue="unknown locality" />
         <OutputClaim ClaimTypeReferenceId="region" PartnerClaimType="region" DefaultValue="unknown region" />
         <OutputClaim ClaimTypeReferenceId="IAL" PartnerClaimType="identity_assurance_level_achieved" DefaultValue="unknown IAL" />
         <OutputClaim ClaimTypeReferenceId="picture" PartnerClaimType="thumbnail_portrait" DefaultValue="unknown portrait" />
         <OutputClaim ClaimTypeReferenceId="middle_name" PartnerClaimType="middle_name" DefaultValue="unknown middle name" />
         <OutputClaim ClaimTypeReferenceId="birthdate" PartnerClaimType="birthdate" DefaultValue="unknown DOB" />
         <OutputClaim ClaimTypeReferenceId="newUser" PartnerClaimType="signupConditionsSatisfied" DefaultValue="false" />
       </OutputClaims>
       <SubjectNamingInfo ClaimType="sub" />
     </TechnicalProfile>
   </RelyingParty>

カスタム ポリシーをアップロードする

次の手順では、Azure AD B2C テナントでディレクトリを使用します。

  1. Azure portal にサインインします。
  2. ポータルのツール バーで、[ディレクトリとサブスクリプション] を選択します。
  3. ポータルの [設定]、[ディレクトリとサブスクリプション] ページの [ディレクトリ名] の一覧で、Azure AD B2C ディレクトリを見つけます。
  4. [切り替え] を選択します。
  5. Azure portal で、 [Azure AD B2C] を検索して選択します。
  6. [ポリシー][Identity Experience Framework] を選択します。
  7. [カスタム ポリシーのアップロード] を選択します。
  8. 変更した 2 つのポリシー ファイルを次の順序でアップロードします。
  • 拡張機能ポリシー (TrustFrameworkBase.xml など)
  • 証明書利用者ポリシー (例: SignUp.xml)

カスタム ポリシーをテストする

  1. 証明書利用者ポリシー (例: B2C_1A_signup) を選択します。
  2. [アプリケーション] で、登録した Web アプリケーションを選択します。
  3. [返信 URL]https://jwt.ms です。
  4. [今すぐ実行] を選択します。
  5. サインアップ ポリシーによって eID-Me が呼び出されます。
  6. サインインの場合、eID-Me を選択します。
  7. ブラウザーが https://jwt.ms にリダイレクトされます。
  8. Azure AD B2C によって返されたトークンの内容が表示されます。

詳細については、「チュートリアル: Azure Active Directory B2C に Web アプリケーションを登録する」を参照してください

次のステップ