Created
October 31, 2022 01:30
-
-
Save rbrayb/52b609508b75be95170e2cbe351ef61a to your computer and use it in GitHub Desktop.
Anonymous access to Azure AD B2C
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
| <TrustFrameworkPolicy | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xmlns:xsd="http://www.w3.org/2001/XMLSchema" | |
| xmlns="http://schemas.microsoft.com/online/cpim/schemas/2013/06" | |
| PolicySchemaVersion="0.3.0.0" | |
| TenantId="tenant.onmicrosoft.com" | |
| PolicyId="B2C_1A_Anon_SUSI" | |
| PublicPolicyUri="http://tenant.onmicrosoft.com/B2C_1A_Anon_SUSI"> | |
| <BasePolicy> | |
| <TenantId>tenant.onmicrosoft.com</TenantId> | |
| <PolicyId>B2C_1A_TrustFrameworkExtensions</PolicyId> | |
| </BasePolicy> | |
| <BuildingBlocks> | |
| <ClaimsSchema> | |
| <ClaimType Id="anonUser"> | |
| <DisplayName>Anonymous User</DisplayName> | |
| <DataType>boolean</DataType> | |
| <AdminHelpText>Specifies whether the user is anonymous.</AdminHelpText> | |
| <UserHelpText>Specifies whether the user is anonymous.</UserHelpText> | |
| </ClaimType> | |
| </ClaimsSchema> | |
| </BuildingBlocks> | |
| <UserJourneys> | |
| <UserJourney Id="AnonSignUpOrSignIn"> | |
| <OrchestrationSteps> | |
| <OrchestrationStep Order="1" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JwtIssuer"/> | |
| </OrchestrationSteps> | |
| </UserJourney> | |
| </UserJourneys> | |
| <RelyingParty> | |
| <DefaultUserJourney ReferenceId="AnonSignUpOrSignIn"/> | |
| <TechnicalProfile Id="PolicyProfile"> | |
| <DisplayName>PolicyProfile</DisplayName> | |
| <Protocol Name="OpenIdConnect"/> | |
| <OutputClaims> | |
| <OutputClaim ClaimTypeReferenceId="displayName" PartnerClaimType="name" AlwaysUseDefaultValue="true" DefaultValue="Anon User"/> | |
| <OutputClaim ClaimTypeReferenceId="givenName" AlwaysUseDefaultValue="true" DefaultValue="Anon"/> | |
| <OutputClaim ClaimTypeReferenceId="surname" AlwaysUseDefaultValue="true" DefaultValue="User"/> | |
| <OutputClaim ClaimTypeReferenceId="anonUser" AlwaysUseDefaultValue="true" DefaultValue="true"/> | |
| <OutputClaim ClaimTypeReferenceId="objectId" PartnerClaimType="sub" AlwaysUseDefaultValue="true" DefaultValue="123456"/> | |
| <OutputClaim ClaimTypeReferenceId="tenantId" AlwaysUseDefaultValue="true" DefaultValue="{Policy:TenantObjectId}"/> | |
| </OutputClaims> | |
| <SubjectNamingInfo ClaimType="sub"/> | |
| </TechnicalProfile> | |
| </RelyingParty> | |
| </TrustFrameworkPolicy> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://medium.com/the-new-control-plane/anonymous-access-to-azure-ad-b2c-2e2c81bb0f7f