Skip to content

Automation

Cam Murray edited this page May 20, 2020 · 2 revisions

Automating ORCA

Creating a Service Account

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.

  1. Create a new account in Office 365, remember to use a really long and secure password.
  2. Browse to https://outlook.office365.com/ecp
  3. Go to permissions / admin roles
  4. Add your newly created user to the 'View Only Organization Management' role group

Azure Automation

  1. Create a new Azure Automation account, ensure that you create a Run As account, this is used to fetch the credential specified later.
  2. In the Azure Automation portal, browse to the automation account you created
  3. Create a credential from Shared Resources\Credentials
  4. For your credential name, use ORCA, and then enter the username and password for your service account
  5. 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.
  6. Create a new runbook of type 'PowerShell'
Clone this wiki locally