Skip to content

Instantly share code, notes, and snippets.

@morgansimonsen
Created February 28, 2017 11:34
Show Gist options
  • Save morgansimonsen/5b6e986e8edf9e5d15c84b557aa8a04d to your computer and use it in GitHub Desktop.
Save morgansimonsen/5b6e986e8edf9e5d15c84b557aa8a04d to your computer and use it in GitHub Desktop.
Azure AD External IdP for Azure AD B2C
<ClaimsProvider>
<DisplayName>External Azure Active Directory</DisplayName>
<TechnicalProfiles>
<TechnicalProfile Id="ExternalAzureActiveDirectory-OpenIdConnect">
<DisplayName>Azure Active Directory</DisplayName>
<Protocol Name="OpenIdConnect" />
<OutputTokenFormat>JWT</OutputTokenFormat>
<Metadata>
<Item Key="METADATA">https://login.windows.net/<insert-tenant-id>/.well-known/openid-configuration</Item>
<Item Key="ProviderName">https://sts.windows.net/<insert-tenant-id>/</Item>
<Item Key="HttpBinding">POST</Item>
<Item Key="BearerTokenTransmissionMethod">AuthorizationHeader</Item>
<Item Key="scope">openid</Item>
<Item Key="response_types">code</Item>
<Item Key="client_id"><insert-application-id></Item>
<Item Key="IdTokenAudience"><insert-application-id></Item>
</Metadata>
<CryptographicKeys>
<Key Id="client_secret" StorageReferenceId="AzureActiveDirectoryClientSecret" />
</CryptographicKeys>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="authenticationSource" DefaultValue="externalAuthentication" />
<OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="unique_name" />
<OutputClaim ClaimTypeReferenceId="givenName" PartnerClaimType="given_name" />
<OutputClaim ClaimTypeReferenceId="identityProvider" PartnerClaimType="idp" DefaultValue="https://sts.windows.net/<insert-tenant-id>/" />
<OutputClaim ClaimTypeReferenceId="surname" PartnerClaimType="family_name" />
<OutputClaim ClaimTypeReferenceId="userId" PartnerClaimType="oid" />
</OutputClaims>
<OutputClaimsTransformations>
<OutputClaimsTransformation ReferenceId="CreateAlternativeSecurityId" />
<OutputClaimsTransformation ReferenceId="CreateDisplayNameFromGivenNameAndSurname" />
<OutputClaimsTransformation ReferenceId="CreateRandomUPNUserName" />
<OutputClaimsTransformation ReferenceId="CreateUserPrincipalName" />
</OutputClaimsTransformations>
</TechnicalProfile>
</TechnicalProfiles>
</ClaimsProvider>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment