Microsoft Exchange Online
A Microsoft email and calendaring hosted service.
1,395 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to give a managed identity exhcange admin role to run automations in azure however when using
$MIAppID = 'my id'
$params = @{
ServicePrincipalId = $MIAppID # managed identity object id
PrincipalId = $MIAppID # managed identity object id
ResourceId = (Get-MgServicePrincipal -Filter "AppId eq '00000002-0000-0ff1-ce00-000000000000'").id # Exchange online
AppRoleId = "dc50a0fb-09a3-484d-be87-e023b12c6440" # Exchange.ManageAsApp
}
New-MgServicePrincipalAppRoleAssignedTo @params
I get: The 'Get-mgserviceprincipal' command was found in the module 'Microsoft.Graph.Applications', but the module could not be loaded. For more information, run 'Import-Module Microsoft.Graph.Applications'.
I then install the latest verson but still the same issue? Any ideas where I am going wrong?