azure-b2c

graph explorer

open with a specific tenant

Add ?tenant=yourtenant.onmicrosoft.com to the URL to open with a specific tenant, eg: https://developer.microsoft.com/en-us/graph/graph-explorer?tenant=yourtenant.onmicrosoft.com

automate policy uploading

in a pipeline with ieftool:

locally with ieftool:

locally with powershell:

$tenant = "yourtenant.onmicrosoft.com"

# Connect to graph
Connect-MgGraph -Tenant $tenant -Scopes "Policy.Read.All", "Policy.ReadWrite.TrustFramework" -NoWelcome

$files = @(
    , "B2C_1A_TRUSTFRAMEWORKBASE.xml"
    , "B2C_1A_TRUSTFRAMEWORKLOCALIZATION.xml"
    , "B2C_1A_TRUSTFRAMEWORKEXTENSIONS.xml"
    , "B2C_1A_SIGNIN_SIGNOUT.xml"
)

# Upload files
foreach ($file in $files) {
    $policy = Get-Content -Path $file -Raw
    Write-Host "Uploading policy $policyPath, of length $($policy.Length) bytes"
    Invoke-MgGraphRequest -Method POST -Uri "https://graph.microsoft.com/beta/trustFramework/policies" -Body $policy -ContentType "application/xml" -OutputFilePath out.xml
}

phone mfa - microsoft samples

limits