Skip to content

Instantly share code, notes, and snippets.

View kevball2's full-sized avatar

Kevin kevball2

View GitHub Profile
@kevball2
kevball2 / azdo_iac_ondemand.yml
Created March 29, 2024 16:24
Azdo conditional check for changes to IaC files
#determines if changes were made to the IaC files since the last commit
- stage: verify_changes
displayName: "Determine updated files"
jobs:
- job: determine_changes_infra
displayName: Determine if infrastructure code has been updated.
steps:
- powershell: |
$changedFiles = git diff HEAD HEAD~ --name-only
git diff HEAD HEAD~ --name-only
@kevball2
kevball2 / gist:697f7a1912b26a0ffaae5770df565abb
Last active March 1, 2024 18:20
PowerShell B2C Application Creation
$B2CTenantName = '<B2cTenantName>'
if (Get-Module -ListAvailable -Name Microsoft.Graph) {
Write-Host "Module Microsoft.Graph exists."
}
else {
throw "Module Microsoft.Graph is not installed yet. Please install it first! Run 'Install-Module Microsoft.Graph'."
}
# On the initial connection to your tenant, you will need an admin account to approve the Admin Consent
# to access tenant resources.
Connect-MgGraph -TenantId "$($B2CTenantName).onmicrosoft.com" `