Skip to content

Instantly share code, notes, and snippets.

View rbrayb's full-sized avatar

rbrayb rbrayb

View GitHub Profile
@rbrayb
rbrayb / FindIdentifier.xml
Last active October 6, 2023 19:03
Using identities in Azure AD B2C
<?xml version="1.0" encoding="utf-8" ?>
<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="yourtenant.onmicrosoft.com"
PolicyId="B2C_1A_Identifier_signin"
PublicPolicyUri="http://yourtenant.onmicrosoft.com/B2C_1A_Identifier_signin"
DeploymentMode="Development"
UserJourneyRecorderEndpoint="urn:journeyrecorder:applicationinsights">
@rbrayb
rbrayb / air
Created May 17, 2022 03:51
Using a QR code with Azure AD B2C
<?xml version="1.0" encoding="utf-8" ?>
<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="yourtenant.onmicrosoft.com"
PolicyId="B2C_1A_QR"
PublicPolicyUri="http://yourtenant.onmicrosoft.com/B2C_1A_QR">
@rbrayb
rbrayb / B2C_1A_Beeceptor_Test_API_xxx.xml
Created April 11, 2022 20:43
Using JSON in REST API with Azure AD B2C
<?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="yourtenant.onmicrosoft.com"
PolicyId="B2C_1A_Beeceptor_Test_xxx"
PublicPolicyUri="http://yourtenant.onmicrosoft.com/B2C_1A_Beeceptor_Test_xxx"
DeploymentMode="Development"
@rbrayb
rbrayb / B2C_1A_Beeceptor_Test - Medium.xml
Created March 8, 2022 22:50
Mocking B2C REST API calls
<?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="yourtenant.onmicrosoft.com"
PolicyId="B2C_1A_Beeceptor_Test"
PublicPolicyUri="http://yourtenant.onmicrosoft.com/B2C_1A_Beeceptor_Test"
DeploymentMode="Development"
@rbrayb
rbrayb / PhoneFactor_extension.xml
Created October 28, 2021 22:16
Setting a default value for the PhoneFactor country dropdown in Azure AD B2C
<BuildingBlocks>
<ContentDefinitions>
<ContentDefinition Id="api.phonefactor">
<!-- Change default phone dropdown order to put AU on top -->
<LocalizedResourcesReferences MergeBehavior="Prepend">
<LocalizedResourcesReference Language="en" LocalizedResourcesReferenceId="api.phonefactor.en"/>
</LocalizedResourcesReferences>
</ContentDefinition>
</ContentDefinitions>
<?xml version="1.0" encoding="utf-8"?>
<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_MediumB2C_ExerciseExtensions"
PublicPolicyUri="http://tenant.onmicrosoft.com/B2C_1A_MediumB2C_ExerciseExtensions">
<!-- Exercise 1 -->
@rbrayb
rbrayb / Username_ProofUp_MLB2C.xml
Created September 20, 2021 02:10
Hosting the id_token_hint well-known endpoint in Azure AD B2C itself
<?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_Username_ProofUp_MLB2C"
PublicPolicyUri="http://tenant.onmicrosoft.com/B2C_1A_Username_ProofUp_MLB2C"
DeploymentMode="Development"
@rbrayb
rbrayb / B2C_1A_TrustFrameworkExtensions_Func_Auth.xml
Created June 14, 2021 02:29
Using a different Identity repository for Azure AD B2C
<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_TrustFrameworkExtensions_Func_Auth" PublicPolicyUri="http://tenant.onmicrosoft.com/B2C_1A_TrustFrameworkExtensions_Func_Auth" TenantObjectId="65f...b2316">
<BasePolicy>
<TenantId>tenant.onmicrosoft.com</TenantId>
<PolicyId>B2C_1A_TrustFrameworkBase_Func</PolicyId>
</BasePolicy>
<BuildingBlocks>
<ClaimsSchema>
<ClaimType Id="role">
<DataType>string</DataType>
@rbrayb
rbrayb / B2C_1A_Username_SUSI.xml
Created April 27, 2021 01:51
Implementing security questions and answers on Azure AD B2C
<?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_Username_SUSI"
PublicPolicyUri="http://tenant.onmicrosoft.com/B2C_1A_Username_SUSI">
<BasePolicy>
@rbrayb
rbrayb / B2C-SAML-CS.xml
Created November 12, 2020 21:20
Connecting the ComponentSpace SAML 2.0 stack to Azure AD B2C
<?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_SAML2_CS_signup_signin"
PublicPolicyUri="http://tenant.onmicrosoft.com/B2C_1A_SAML2_CS_signup_signin">
<BasePolicy>
<TenantId>tenant.onmicrosoft.com</TenantId>
<PolicyId>B2C_1A_TrustFrameworkExtensions</PolicyId>