중요합니다
2025년 5월 1일부터 새 고객을 위해 Azure AD B2C를 더 이상 구매할 수 없습니다. FAQ에서 자세히 알아보세요.
비고
Azure Active Directory B2C에서 사용자 지정 정책은 주로 복잡한 시나리오를 해결하기 위해 설계되었습니다. 대부분의 시나리오에서 기본 제공 사용자 흐름을 사용하는 것이 좋습니다. 아직 수행하지 않았다면 Active Directory B2C에서 사용자 지정 정책 시작하기에서 사용자 지정 정책 스타터 팩에 대해 알아봅니다.
Azure AD B2C(Azure Active Directory B2C)는 Microsoft Entra 사용자 관리를 지원합니다. 이 문서에서는 이 표준 프로토콜을 지원하는 클레임 공급자와 상호 작용하기 위한 기술 프로필에 대해 구체적으로 설명합니다.
프로토콜
Protocol 요소의 Name 특성을 .로 설정Proprietary해야 합니다.
handler 특성은 프로토콜 처리기 어셈블리Web.TPEngine.Providers.AzureActiveDirectoryProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null의 정규화된 이름을 포함해야 합니다.
사용자 지정 정책 스타터 팩에 따라 Microsoft Entra 기술 프로필에는 AAD-Common 기술 프로필이 포함됩니다. 프로토콜이 AAD-Common 기술 프로필에 구성되어 있기 때문에 Microsoft Entra 기술 프로필은 프로토콜을 지정하지 않습니다.
- AAD-UserReadUsingAlternativeSecurityId 및 AAD-UserReadUsingAlternativeSecurityId-NoError - 디렉터리에서 소셜 계정을 조회합니다.
- AAD-UserWriteUsingAlternativeSecurityId - 새 소셜 계정을 만듭니다.
- AAD-UserReadUsingEmailAddress - 디렉터리에서 로컬 계정을 조회합니다.
- AAD-UserWriteUsingLogonEmail - 새 로컬 계정을 만듭니다.
- AAD-UserWritePasswordUsingObjectId - 로컬 계정의 암호를 업데이트합니다.
- AAD-UserWriteProfileUsingObjectId - 로컬 또는 소셜 계정의 사용자 프로필을 업데이트합니다.
- AAD-UserReadUsingObjectId - 로컬 또는 소셜 계정의 사용자 프로필을 읽습니다.
- AAD-UserWritePhoneNumberUsingObjectId - 로컬 또는 소셜 계정의 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 요소에는 디렉터리에서 계정을 조회하거나 새 계정을 만드는 데 사용되는 클레임이 포함되어 있습니다. 모든 Microsoft Entra 기술 프로필에 대한 입력 클레임 컬렉션에는 정확히 하나의 InputClaim 요소가 있어야 합니다. 정책에 정의된 클레임의 이름을 Microsoft Entra ID에 정의된 이름에 매핑해야 할 수 있습니다.
기존 사용자 계정을 읽거나 업데이트하거나 삭제하기 위해 입력 클레임은 Microsoft Entra 디렉터리에서 계정을 고유하게 식별하는 키입니다. 예를 들어 objectId, userPrincipalName, signInNames.emailAddress, signInNames.userName 또는 alternativeSecurityId가 있습니다.
새 사용자 계정을 만들기 위해 input 클레임은 로컬 또는 페더레이션 계정을 고유하게 식별하는 키입니다. 예를 들어 로컬 계정: signInNames.emailAddress 또는 signInNames.userName입니다. 페더레이션 계정의 경우: alternativeSecurityId.
InputClaimsTransformations 요소에는 입력 클레임을 수정하거나 새 클레임을 생성하는 데 사용되는 입력 클레임 변환 요소의 컬렉션이 포함될 수 있습니다.
출력클레임
OutputClaims 요소에는 Microsoft Entra 기술 프로필에서 반환된 클레임 목록이 포함되어 있습니다. 정책에 정의된 클레임의 이름을 Microsoft Entra ID에 정의된 이름에 매핑해야 할 수 있습니다. 특성을 설정하는 한 Microsoft Entra ID에서 반환되지 않는 클레임을 DefaultValue 포함할 수도 있습니다.
OutputClaimsTransformations 요소에는 출력 클레임을 수정하거나 새 클레임을 생성하는 데 사용되는 OutputClaimsTransformation 요소의 컬렉션이 포함될 수 있습니다.
예를 들어 AAD-UserWriteUsingLogonEmail 기술 프로필은 로컬 계정을 만들고 다음 클레임을 반환합니다.
- objectId는 새 계정의 식별자입니다.
- newUser: 사용자가 새 사용자인지 여부를 나타냅니다.
-
authenticationSource를 사용하여 인증을
localAccountAuthentication - userPrincipalName - 새 계정의 사용자 계정 이름입니다.
- signInNames.emailAddress는 email 입력 클레임과 유사한 계정 로그인 이름입니다.
<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>
PartnerClaimType 특성을 지정하지 않는 한 클레임의 이름은 Microsoft Entra 특성의 이름이며, 여기에는 Microsoft Entra 특성 이름이 포함됩니다.
작업 요구 사항
- 모든 Microsoft Entra 기술 프로필에 대한 클레임 모음에는 정확히 하나의 InputClaim 요소가 있어야 합니다.
- 사용자 프로필 특성 문서에서는 입력 클레임, 출력 클레임 및 지속형 클레임에서 사용할 수 있는 지원되는 Azure AD B2C 사용자 프로필 특성에 대해 설명합니다.
- 작업이
Write또는DeleteClaims인 경우 PersistedClaims 요소에도 표시되어야 합니다. -
userPrincipalName 클레임
user@tenant.onmicrosoft.com의 값은 . - displayName 클레임은 필수이며 빈 문자열일 수 없습니다.
Microsoft Entra 기술 프로필 작업
읽다
읽기 작업은 단일 사용자 계정에 대한 데이터를 읽습니다. 다음 기술 프로필은 사용자의 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>
작성하다
쓰기 작업은 단일 사용자 계정을 만들거나 업데이트합니다. 다음 기술 프로필은 새 소셜 계정을 만듭니다.
<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>
메타데이터
| 특성 | 필수 | 설명 |
|---|---|---|
| 수술 | 예 | 수행할 작업입니다. 가능한 값: Read, Write, DeleteClaims또는 DeleteClaimsPrincipal. |
| RaiseErrorIfClaimsPrincipalDoesNotExist | 아니오 | 사용자 개체가 디렉터리에 없는 경우 오류를 발생시킵니다. 가능한 값은 true 또는 false입니다. |
| RaiseErrorIfClaimsPrincipalAlreadyExists | 아니오 | 사용자 개체가 이미 있는 경우 오류를 발생시킵니다. 가능한 값은 true 또는 false입니다. 이 메타데이터는 쓰기 작업에만 적용할 수 있습니다. |
| ApplicationObjectId | 아니오 | 확장 속성에 대한 응용 프로그램 개체 식별자입니다. 값: 애플리케이션의 ObjectId입니다. 자세한 내용은 사용자 지정 속성 사용을 참조하세요. |
| ClientId | 아니오 | 제3자로 테넌트에 액세스하기 위한 클라이언트 식별자입니다. 자세한 내용은 사용자 지정 프로필 편집 정책에서 사용자 지정 속성 사용을 참조하세요. |
| IncludeClaimResolvingInClaimsHandling | 아니오 | 입력 및 출력 클레임의 경우 기술 프로필에 클레임 해결이 포함되는지 여부를 지정합니다. 가능한 값: true또는 false (기본값) 기술 프로필에서 클레임 해결 프로그램을 사용하려면 이를 true로 설정합니다. |
UI 요소
다음 설정을 사용하여 실패 시 표시되는 오류 메시지를 구성할 수 있습니다. 메타데이터는 자체 어설션된 기술 프로필에서 구성해야 합니다. 오류 메시지를 지역화할 수 있습니다.
| 특성 | 필수 | 설명 |
|---|---|---|
| UserMessageIfClaimsPrincipalAlreadyExists | 아니오 | 오류가 발생해야 하는 경우(RaiseErrorIfClaimsPrincipalAlreadyExists 특성 설명 참조) 사용자 개체가 이미 있는 경우 사용자에게 표시할 메시지를 지정합니다. |
| UserMessageIfClaimsPrincipalDoesNotExist | 아니오 | 오류가 발생해야 하는 경우(RaiseErrorIfClaimsPrincipalDoesNotExist 특성 설명 참조) 사용자 개체가 없는 경우 사용자에게 표시할 메시지를 지정합니다. |
다음 단계
예를 들어 Microsoft Entra 기술 프로필을 사용하는 방법에 대한 다음 문서를 참조하세요.