-
Notifications
You must be signed in to change notification settings - Fork 51
Automation
Cam Murray edited this page May 20, 2020
·
2 revisions
Currently, Exchange Online PowerShell tools do not support the use of a service principal. Automating will require that you provision a service account, however this account does not require a license and only needs view permissions to Exchange Online.
- Create a new account in Office 365, remember to use a really long and secure password.
- Browse to https://outlook.office365.com/ecp
- Go to permissions / admin roles
- Add your newly created user to the 'View Only Organization Management' role group
- Create a new Azure Automation account, ensure that you create a Run As account, this is used to fetch the credential specified later.
- In the Azure Automation portal, browse to the automation account you created
- Create a credential from Shared Resources\Credentials
- For your credential name, use ORCA, and then enter the username and password for your service account
- From the Module Gallery section, add "Az.Accounts", "Az.Automation", "ORCA" and "ExchangeOnlineManagement" in this order. This will take some time and you can see the status from the "Modules" section.
- Create a new runbook of type 'PowerShell'