Skip to content

Instantly share code, notes, and snippets.

View rbrayb's full-sized avatar

rbrayb rbrayb

View GitHub Profile
@rbrayb
rbrayb / Display-definition.json
Created October 28, 2023 02:28
Configuring an Entra VC and testing it via Postman
{
"locale": "en-US",
"card": {
"backgroundColor": "#E74C3C",
"description": "Azure UG Plus verified member",
"issuedBy": "Azure UG",
"textColor": "#ffffff",
"title": "Azure UG Plus member",
"logo": {
"description": "Gourmet pastry",
@rbrayb
rbrayb / SignupOrSigninVCQ.xml
Created June 12, 2023 02:07
Getting the Verifiable Credentials .NET sample 3 working (Part 2)
<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_VC_susiq"
PublicPolicyUri="http://tenant.onmicrosoft.com/B2C_1A_VC_susiq"
DeploymentMode="Development" UserJourneyRecorderEndpoint="urn:journeyrecorder:applicationinsights"
>
<BasePolicy>
<TenantId>tenant.onmicrosoft.com</TenantId>
<PolicyId>B2C_1A_TrustFrameworkExtensionsVC</PolicyId>
</BasePolicy>
@rbrayb
rbrayb / b2c-DisplayFile.json
Created June 5, 2023 04:20
Display and rules files for VC sample 3
{
"locale": "en-US",
"card": {
"title": "B2CVerifiedAccount",
"issuedBy": "B2CTenant",
"backgroundColor": "#B8CEC1",
"textColor": "#ffffff",
"logo": {
"uri": "https://cljungdemob2c.blob.core.windows.net/uxcust/templates/images/snoopy-small.jpg",
"description": "B2C Logo"
@rbrayb
rbrayb / Display-token.xml
Created April 4, 2023 08:26
Displaying the access token when federating with 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_DISPLAYTOKEN"
PublicPolicyUri="http://tenant.onmicrosoft.com/B2C_1A_DISPLAYTOKEN"
DeploymentMode="Development" UserJourneyRecorderEndpoint="urn:journeyrecorder:applicationinsights"
TenantObjectId="d7c...a9">
<BasePolicy>
<TenantId>tenant.onmicrosoft.com</TenantId>
@rbrayb
rbrayb / HTMLError-InputType-Medium.xml
Last active March 20, 2023 06:39
Tracing a weird exception 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="yourtenant.onmicrosoft.com"
PolicyId="B2C_1A_HTML_Error" PublicPolicyUri="http://yourtenant.onmicrosoft.com/B2C_1A_HTML_Error"
DeploymentMode="Development"
UserJourneyRecorderEndpoint="urn:journeyrecorder:applicationinsights">
<!-- Web.TPEngine.StateMachineHandlers.SendErrorResponseToXmlHttpRequestClient -->
# Set the Azure AD B2C tenant name and endpoint
$tenantName = "tenantname"
# Connect to Azure AD B2C
Connect-AzureAD -Tenant "$tenantName.onmicrosoft.com"
# Import the Excel spreadsheet as a PowerShell object
$excelFilePath = "C:\...\Downloads\AuditLogs_2023–02–22.xlsx"
$worksheetName = "AuditLogs_2023–02–22"
$excelData = Import-Excel -Path $excelFilePath -WorksheetName $worksheetName
@rbrayb
rbrayb / Anon_SUSI.xml
Created October 31, 2022 01:30
Anonymous access 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_Anon_SUSI"
PublicPolicyUri="http://tenant.onmicrosoft.com/B2C_1A_Anon_SUSI">
@rbrayb
rbrayb / B2C_1A_MagicLink.xml
Last active September 22, 2022 19:51
Creating an approval journey with Azure AD B2C
@rbrayb
rbrayb / Link-TrustFrameworkExtensions.xml
Last active June 22, 2022 20:33
Linking a federated login against an existing Azure AD B2C local account
@rbrayb
rbrayb / B2C_1A_DisableSocialAcct_TrustFrameworkExtensions.xml
Created June 19, 2022 08:43
Fixing one of the Azure AD B2C samples that refers to a disabled federated user.
<?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_DisableSocialAcct_TrustFrameworkExtensions" PublicPolicyUri="http://yourtenant.onmicrosoft.com/B2C_1A_DisableSocialAcct_TrustFrameworkExtensions">
<BasePolicy>
<TenantId>yourtenant.onmicrosoft.com</TenantId>
<PolicyId>B2C_1A_DisableSocialAcct_TrustFrameworkBase</PolicyId>
</BasePolicy>