Created
March 14, 2019 20:07
-
-
Save frankhu-2021/cc7d2359c07cd6ca45cfa21fe13133d2 to your computer and use it in GitHub Desktop.
This gist is a powershell script utilizing AzureAD Preview to get the claims mapping policies for a service principal.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Connect-AzureAD | |
Import-Module "AzureADPreview" | |
$appID = "...guid-of-the-AppID..." | |
$sp = Get-AzureADServicePrincipal -Filter "servicePrincipalNames/any(n: n eq '$appID')" | |
$existingPolicies = Get-AzureADServicePrincipalPolicy -Id $sp.ObjectId ` | |
| Where-Object { $_.Type -eq "ClaimsMappingPolicy" } | |
$existingPolicies |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment