Azure Active Directory B2C의 사용자 지정 정책에서 Microsoft Entra 기술 프로필 정의

참고 항목

Azure Active Directory B2C에서 사용자 지정 정책은 주로 복잡한 시나리오를 해결하기 위해 설계되었습니다. 대부분의 시나리오에서 기본 제공 사용자 흐름을 사용하는 것이 좋습니다. 아직 수행하지 않았다면 Active Directory B2C에서 사용자 지정 정책 시작하기에서 사용자 지정 정책 스타터 팩에 대해 알아봅니다.

Azure AD B2C(Azure Active Directory B2C)는 Microsoft Entra 사용자 관리를 지원합니다. 이 문서에서는 이 표준 프로토콜을 지원하는 클레임 공급자와 상호 작용하기 위한 기술 프로필에 대해 구체적으로 설명합니다.

프로토콜

Protocol 요소의 Name 특성을 .로 설정Proprietary해야 합니다. 처리기 특성은 프로토콜 처리기 어셈블리Web.TPEngine.Providers.AzureActiveDirectoryProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null의 정규화된 이름을 포함해야 합니다.

사용자 지정 정책 시작 팩 Microsoft Entra 기술 프로필에는 AAD-Common 기술 프로필이 포함됩니다. 프로토콜이 AAD-Common 기술 프로필에 구성되어 있으므로 Microsoft Entra 기술 프로필은 프로토콜을 지정하지 않습니다.

  • AAD-UserReadUsingAlternativeSecurityIdAAD-UserReadUsingAlternativeSecurityId-NoError - 디렉터리에서 소셜 계정을 조회합니다.
  • AAD-UserWriteUsingAlternativeSecurityId - 새 소셜 계정을 만듭니다.
  • AAD-UserReadUsingEmailAddress - 디렉터리에서 로컬 계정을 조회합니다.
  • AAD-UserWriteUsingLogonEmail - 새 로컬 계정을 만듭니다.
  • AAD-UserWritePasswordUsingObjectId - 로컬 계정의 암호를 업데이트합니다.
  • AAD-UserWriteProfileUsingObjectId - 로컬 또는 소셜 계정의 사용자 프로필을 업데이트합니다.
  • AAD-UserReadUsingObjectId - 로컬 또는 소셜 계정의 사용자 프로필을 읽습니다.
  • AAD-UserWrite전화NumberUsingObjectId - 로컬 또는 소셜 계정의 MFA 전화 번호 작성

다음 예제에서는 AAD-Common 기술 프로필을 보여줍니다.

<TechnicalProfile Id="AAD-Common">
  <DisplayName>Azure Active Directory</DisplayName>
  <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.AzureActiveDirectoryProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />

  <CryptographicKeys>
    <Key Id="issuer_secret" StorageReferenceId="B2C_1A_TokenSigningKeyContainer" />
  </CryptographicKeys>

  <!-- We need this here to suppress the SelfAsserted provider from invoking SSO on validation profiles. -->
  <IncludeInSso>false</IncludeInSso>
  <UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop" />
</TechnicalProfile>

InputClaims

InputClaims 요소에는 디렉터리에서 계정을 조회하거나 새 계정을 만드는 데 사용되는 클레임이 포함되어 있습니다. 모든 Microsoft Entra 기술 프로필의 입력 클레임 컬렉션에 정확히 하나의 InputClaim 요소가 있어야 합니다. 정책에 정의된 클레임 이름을 Microsoft Entra ID에서 정의된 이름에 매핑해야 할 수도 있습니다.

기존 사용자 계정을 읽거나, 업데이트하거나, 삭제하기 위해 입력 클레임은 Microsoft Entra 디렉터리에서 계정을 고유하게 식별하는 키입니다. 예를 들어 objectId, userPrincipalName, signInNames.emailAddress, signInNames.userName 또는 alternativeSecurityId가 있습니다.

새 사용자 계정을 만들기 위해 입력 클레임은 로컬 또는 페더레이션된 계정을 고유하게 식별하는 키입니다. 예를 들어 로컬 계정: signInNames.emailAddress 또는 signInNames.userName. 페더레이션된 계정의 경우 alternativeSecurityId입니다.

InputClaimsTransformations 요소에는 입력 클레임을 수정하거나 새 클레임을 생성하는 데 사용되는 입력 클레임 변환 요소의 컬렉션이 포함될 수 있습니다.

OutputClaims

OutputClaims 요소는 Microsoft Entra 기술 프로필에서 반환된 클레임 목록을 포함합니다. 정책에 정의된 클레임 이름을 Microsoft Entra ID에서 정의된 이름에 매핑해야 할 수도 있습니다. DefaultValue 특성을 설정하는 한 Microsoft Entra ID에서 반환하지 않는 클레임을 포함할 수도 있습니다.

OutputClaimsTransformations 요소에는 출력 클레임을 수정하거나 새 클레임을 생성하는 데 사용되는 OutputClaimsTransformation 요소의 컬렉션이 포함될 수 있습니다.

예를 들어 AAD-UserWriteUsingLogonEmail 기술 프로필은 로컬 계정을 만들고 다음 클레임을 반환합니다.

  • objectId( 새 계정의 식별자)
  • newUser- 사용자가 새 사용자인지 여부를 나타냅니다.
  • authenticationSource - 인증을 localAccountAuthentication으로 설정합니다.
  • userPrincipalName- 새 계정의 사용자 계정 이름입니다.
  • signInNames.emailAddress( 전자 메일 입력 클레임과 유사하게 계정 로그인 이름)
<OutputClaims>
  <OutputClaim ClaimTypeReferenceId="objectId" />
  <OutputClaim ClaimTypeReferenceId="newUser" PartnerClaimType="newClaimsPrincipalCreated" />
  <OutputClaim ClaimTypeReferenceId="authenticationSource" DefaultValue="localAccountAuthentication" />
  <OutputClaim ClaimTypeReferenceId="userPrincipalName" />
  <OutputClaim ClaimTypeReferenceId="signInNames.emailAddress" />
</OutputClaims>

PersistedClaims

PersistedClaims 요소는 정책의 ClaimsSchema 섹션에 이미 정의된 클레임 유형과 Microsoft Entra 특성 이름 간에 가능한 매핑 정보를 사용하여 Microsoft Entra ID에서 저장해야 하는 모든 값을 포함합니다.

새 로컬 계정을 만드는 AAD-UserWriteUsingLogonEmail 기술 프로필은 다음 클레임을 유지합니다.

  <PersistedClaims>
    <!-- Required claims -->
    <PersistedClaim ClaimTypeReferenceId="email" PartnerClaimType="signInNames.emailAddress" />
    <PersistedClaim ClaimTypeReferenceId="newPassword" PartnerClaimType="password"/>
    <PersistedClaim ClaimTypeReferenceId="displayName" DefaultValue="unknown" />
    <PersistedClaim ClaimTypeReferenceId="passwordPolicies" DefaultValue="DisablePasswordExpiration" />

    <!-- Optional claims. -->
    <PersistedClaim ClaimTypeReferenceId="givenName" />
    <PersistedClaim ClaimTypeReferenceId="surname" />
  </PersistedClaims>

Microsoft Entra 특성 이름을 포함하는 PartnerClaimType 특성이 지정되지 않은 경우 클레임 이름은 Microsoft Entra 특성 이름입니다.

작업의 요구 사항

  • 모든 Microsoft Entra 기술 프로필의 클레임 모음에 정확히 하나의 InputClaim 요소가 있어야 합니다.
  • 사용자 프로필 특성 문서에서입력 클레임, 출력 클레임 및 지속형 클레임에서 사용할 수 있는 지원되는 Azure AD B2C 사용자 프로필 특성을 설명합니다.
  • 작업이 Write 또는 DeleteClaims이면 PersistedClaims 요소에도 표시되어야 합니다.
  • userPrincipalName 클레임의 값은 형식이어야 user@tenant.onmicrosoft.com합니다.
  • displayName 클레임이 필요하며 빈 문자열일 수 없습니다.

Microsoft Entra 기술 프로필 작업

읽음

Read 작업은 단일 사용자 계정에 대한 데이터를 읽습니다. 다음 기술 프로필은 사용자의 objectId를 사용하여 사용자 계정에 대한 데이터를 읽습니다.

<TechnicalProfile Id="AAD-UserReadUsingObjectId">
  <Metadata>
    <Item Key="Operation">Read</Item>
    <Item Key="RaiseErrorIfClaimsPrincipalDoesNotExist">true</Item>
  </Metadata>
  <IncludeInSso>false</IncludeInSso>
  <InputClaims>
    <InputClaim ClaimTypeReferenceId="objectId" Required="true" />
  </InputClaims>
  <OutputClaims>

    <!-- Required claims -->
    <OutputClaim ClaimTypeReferenceId="strongAuthenticationPhoneNumber" />

    <!-- Optional claims -->
    <OutputClaim ClaimTypeReferenceId="signInNames.emailAddress" />
    <OutputClaim ClaimTypeReferenceId="displayName" />
    <OutputClaim ClaimTypeReferenceId="otherMails" />
    <OutputClaim ClaimTypeReferenceId="givenName" />
    <OutputClaim ClaimTypeReferenceId="surname" />
  </OutputClaims>
  <IncludeTechnicalProfile ReferenceId="AAD-Common" />
</TechnicalProfile>

쓰기

Write 작업은 단일 사용자 계정을 만들거나 업데이트합니다. 다음 기술 프로필은 새 소셜 계정을 만듭니다.

<TechnicalProfile Id="AAD-UserWriteUsingAlternativeSecurityId">
  <Metadata>
    <Item Key="Operation">Write</Item>
    <Item Key="RaiseErrorIfClaimsPrincipalAlreadyExists">true</Item>
    <Item Key="UserMessageIfClaimsPrincipalAlreadyExists">You are already registered, please press the back button and sign in instead.</Item>
  </Metadata>
  <IncludeInSso>false</IncludeInSso>
  <InputClaimsTransformations>
    <InputClaimsTransformation ReferenceId="CreateOtherMailsFromEmail" />
  </InputClaimsTransformations>
  <InputClaims>
    <InputClaim ClaimTypeReferenceId="AlternativeSecurityId" PartnerClaimType="alternativeSecurityId" Required="true" />
  </InputClaims>
  <PersistedClaims>
    <!-- Required claims -->
    <PersistedClaim ClaimTypeReferenceId="alternativeSecurityId" />
    <PersistedClaim ClaimTypeReferenceId="userPrincipalName" />
    <PersistedClaim ClaimTypeReferenceId="mailNickName" DefaultValue="unknown" />
    <PersistedClaim ClaimTypeReferenceId="displayName" DefaultValue="unknown" />

    <!-- Optional claims -->
    <PersistedClaim ClaimTypeReferenceId="otherMails" />
    <PersistedClaim ClaimTypeReferenceId="givenName" />
    <PersistedClaim ClaimTypeReferenceId="surname" />
  </PersistedClaims>
  <OutputClaims>
    <OutputClaim ClaimTypeReferenceId="objectId" />
    <OutputClaim ClaimTypeReferenceId="newUser" PartnerClaimType="newClaimsPrincipalCreated" />
    <OutputClaim ClaimTypeReferenceId="otherMails" />
  </OutputClaims>
  <IncludeTechnicalProfile ReferenceId="AAD-Common" />
  <UseTechnicalProfileForSessionManagement ReferenceId="SM-AAD" />
</TechnicalProfile>

DeleteClaims

DeleteClaims 작업은 제공된 클레임 목록에서 정보를 지웁니다. 다음 기술 프로필은 클레임을 삭제합니다.

<TechnicalProfile Id="AAD-DeleteClaimsUsingObjectId">
  <Metadata>
    <Item Key="Operation">DeleteClaims</Item>
  </Metadata>
  <InputClaims>
    <InputClaim ClaimTypeReferenceId="objectId" Required="true" />
  </InputClaims>
  <PersistedClaims>
    <PersistedClaim ClaimTypeReferenceId="objectId" />
    <PersistedClaim ClaimTypeReferenceId="Verified.strongAuthenticationPhoneNumber" PartnerClaimType="strongAuthenticationPhoneNumber" />
  </PersistedClaims>
  <OutputClaims />
  <IncludeTechnicalProfile ReferenceId="AAD-Common" />
</TechnicalProfile>

DeleteClaimsPrincipal

DeleteClaimsPrincipal 작업은 디렉터리에서 단일 사용자 계정을 삭제합니다. 다음 기술 프로필은 사용자 계정 이름을 사용하여 디렉터리에서 사용자 계정을 삭제합니다.

<TechnicalProfile Id="AAD-DeleteUserUsingObjectId">
  <Metadata>
    <Item Key="Operation">DeleteClaimsPrincipal</Item>
  </Metadata>
  <InputClaims>
    <InputClaim ClaimTypeReferenceId="objectId" Required="true" />
  </InputClaims>
  <OutputClaims/>
  <IncludeTechnicalProfile ReferenceId="AAD-Common" />
</TechnicalProfile>

다음 기술 프로필은 alternativeSecurityId를 사용하여 소셜 사용자 계정을 삭제합니다.

<TechnicalProfile Id="AAD-DeleteUserUsingAlternativeSecurityId">
  <Metadata>
    <Item Key="Operation">DeleteClaimsPrincipal</Item>
  </Metadata>
  <InputClaims>
    <InputClaim ClaimTypeReferenceId="alternativeSecurityId" Required="true" />
  </InputClaims>
  <OutputClaims/>
  <IncludeTechnicalProfile ReferenceId="AAD-Common" />
</TechnicalProfile>

메타데이터

Attribute Required 설명
연산 수행할 작업입니다. 가능한 값: Read, Write, DeleteClaims또는 DeleteClaimsPrincipal.
RaiseErrorIfClaimsPrincipalDoesNotExist 아니요 사용자 개체가 디렉터리에 없는 경우 오류가 발생합니다. 가능한 값: true 또는 false.
RaiseErrorIfClaimsPrincipalAlreadyExists 아니요 사용자 개체가 이미 있는 경우 오류가 발생합니다. 가능한 값: true 또는 false. 이 메타데이터는 쓰기 작업에만 적용됩니다.
ApplicationObjectId 아니요 확장 특성에 대한 애플리케이션 개체 식별자입니다. 값: 애플리케이션의 ObjectId입니다. 자세한 내용은 사용자 지정 특성 사용을 참조하세요.
ClientId 아니요 타사로 테넌트에 액세스하기 위한 클라이언트 식별자입니다. 자세한 내용은 사용자 지정 프로필 편집 정책에서 사용자 지정 특성 사용을 참조하세요.
IncludeClaimResolvingInClaimsHandling 아니요 입력 및 출력 클레임의 경우 기술 프로필에 클레임 해결이 포함되는지 여부를 지정합니다. 가능한 값: true또는 false (기본값) 기술 프로필에서 클레임 해결 프로그램을 사용하려면 이를 true로 설정합니다.

UI 요소

다음 설정을 사용하여 오류 발생 시 표시되는 오류 메시지를 구성할 수 있습니다. 메타데이터는 자체 어설션된 기술 프로필에서 구성해야 합니다. 오류 메시지를 지역화수 있습니다.

Attribute Required 설명
UserMessageIfClaimsPrincipalAlreadyExists 아니요 오류가 발생하는 경우(RaiseErrorIfClaimsPrincipalAlreadyExists 특성 설명 참조) 사용자 개체가 이미 있는 경우 사용자에게 표시할 메시지를 지정합니다.
UserMessageIfClaimsPrincipalDoesNotExist 아니요 오류가 발생하는 경우(RaiseErrorIfClaimsPrincipalDoesNotExist 특성 설명 참조) 사용자 개체가 없는 경우 사용자에게 표시할 메시지를 지정합니다.

다음 단계

Microsoft Entra 기술 프로필 사용에 대한 예는 다음 문서를 참조하세요.