I have a couple of Azure Automation runbooks that update Dynamic Distribution Lists. To make this work, I gave the Azure Automation System-Assigned Managed Identity permissions to access and make changes to Exchange Online using steps here; https://learn.microsoft.com/en-us/powershell/exchange/connect-exo-powershell-managed-identity?view=exchange-ps#step-4-grant-the-exchangemanageasapp-api-permission-for-the-managed-identity-to-call-exchange-online. These runbooks work as designed.
I’m in the process of developing more automation using a separate Automation account and Managed Identity. I want to confirm the Managed Identities that have access to Exchange Online. How can I list which Managed Identities have access to Exchange Online? I’ve tried Get-MgServicePrincipalAppRoleAssignedTo
, but this only lists Entra ID Enterprise and Registered Apps, not Exchange Online.
Similarly, is there a way to list all permissions and roles assigned to an Azure Automation Managed Identity? I granted a new Managed Identity the User Management role in Entra ID, but this does not show up under the Managed Identity, but the Managed Identity is listed under the individual Roles.
Thank you for your time.