Skip to content

Instantly share code, notes, and snippets.

@nichollsc81
Last active October 1, 2021 11:07
Show Gist options
  • Save nichollsc81/990b3d45041621f9d2ea54b5885f85df to your computer and use it in GitHub Desktop.
Save nichollsc81/990b3d45041621f9d2ea54b5885f85df to your computer and use it in GitHub Desktop.
Returns AAD Object_ID for given Az Web App
#Requires -module az.websites
param(
$AppName = 'cirrus-a'
)
$App = [ordered]@{
AppName = $AppName
AAD_ID = $((Get-AzWebApp | Where-Object Name -EQ $AppName).Identity.PrincipalId)
HostName = $((Get-AzWebApp | Where-Object Name -EQ $AppName).DefaultHostName)
}
$App | Format-Table -HideTableHeaders -AutoSize
'08f0d836-5849-441c-96ad-3a71f52a812a'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment