People,
What's the required minimum Azure AD role to allow the user to run the Get-AzRoleAssignment?
The user is already part of the Azure AD User Administrator role.
https://learn.microsoft.com/en-US/microsoft-365/admin/add-users/about-admin-roles?WT.mc_id=365AdminCSH_inproduct&view=o365-worldwide#commonly-used-microsoft-365-admin-center-roles
But not sure, why the simple command above is throwing an error when trying to execute the command:
Get-AzRoleAssignment -SignInName 'unknown.user@domain.com'
This is the error I get:
Get-AzRoleAssignment : The term 'Get-AzRoleAssignment' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At C:\script1.ps1:43 char:55
+ Get-AzRoleAssignment -SignInName $U ...
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-AzRoleAssignment:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Any help would be greatly appreciated.
Thanks!