Forum Discussion
Brahmaiah
Aug 27, 2020Brass Contributor
How to List of Azure AD groups for a Service Principal using Power shell
Hi, I want to fetch list of Azure AD groups which are assigned/ added as member for a service principal. I am using below script but it is taking too much of time due to for loop each AD grou...
- Aug 27, 2020
Got solution by using below script.
$ServicePrincipalId = Get-AzureADServicePrincipal -All $true | Where {$_.DisplayName -eq 'xxxxx'} Get-AzureADServicePrincipalMembership -ObjectId $ServicePrincipalId.ObjectId
Brahmaiah
Aug 27, 2020Brass Contributor
Got solution by using below script.
$ServicePrincipalId = Get-AzureADServicePrincipal -All $true | Where {$_.DisplayName -eq 'xxxxx'}
Get-AzureADServicePrincipalMembership -ObjectId $ServicePrincipalId.ObjectId