Connecting Atria to Microsoft Directly
Overview
Atria requires a secure connection to Microsoft in order to automate tasks for Microsoft Tenants. This article describes how to setup a secure connection and configure Atria with the keys needed to utilize this connection.
Before you Start
Pre-requisites: you will need all of the following:
- An Admin account within the AzureAD tenant, which is used to access and creation connection.
- In accordance with Microsoft guidelines, this account must be protected by Multi-Factor Authentication. Please ensure this is set up or this process will fail.
- The ability to start a PowerShell Session on an internet-connected computer.
- Service Provider Administrator access to your Atria instance.
- The Service Schema must be installed and configured prior to connecting to PartnerCenter, refer to the following article: Microsoft Online Service Deployment.
Process
A script is run which performs the following tasks.
- Connects to AzureAD
- Prompts the user for an Application Name
- Creates an “Application” object in AzureAD
- Grants the new Application permissions within AzureAD
- Generates the required tokens needed for Atria to connect to the application securely.
To run the script
-
Start an elevated PowerShell session.
-
Run the following commands:
Install-Module -Name Microsoft.Graph
Install-Module -Name PKCE
Get-Module -ListAvailable
- To verify that the modules are installed using the command
-
Execute the script to create an application object in AzureAD.
Script Location C:\inetpub\Automate101\Atria\Atria Web Services\create-new-direct-azure-app-mggraph.ps1
- You will be prompted to authenticate, use the service account prepared earlier, and complete the 2-factor authentication when challenged.
- You will be prompted to enter a name for the application registration. The default is “Atria MSOL Application” - choose an application registration name that is distinctive and meaningful.
- If the Application registration already exists from a pervious install, we will ask if you want to use it or create a new application, go back to step 5. The Application registration will be created and also the service principle with the required permissions, with a secret.
- You will be prompted a second time – go through the authentication process again, using the same credentials you used earlier.
- Followed by a prompt with a permissions request for your Application. Which will grant permissions for the Application registration and also generate a refresh token
- You will also be asked if you want to install the Exchange App registration. If you agree, repeat from step 5 with the default application name of “Atria MSOL Application Exchange Online”
You will need at least one license in your tenant that can use Exchange Online, for the Exchange Online Application to be created and configured correctly
- The script will complete and output the following credentials. Please make a note of these as they will be used in a later step.
- Tenant ID
- Tenant User Id
- Tenant User Name
- Application ID
- Application Secret
- RefreshToken
- Exchange Application ID
- Exchange ApplicationSecret
- Exchange RefreshToken
Microsoft Online Direct Connection Setup Script Example
- Head back to Atria and navigate to Services > Microsoft Online > Microsoft Connections.
- Click Add.
- Enter the details recorded earlier.
Microsoft Connection Creation
Property/Value | Comments |
---|---|
Label | Free form name for this connection |
Partner Type | Select direct |
Customer | Select the customer in Atria for which you want to connect Microsoft to |
Region | Select the region for this Microsoft Connection - this will be the region in which your tenant is registered. |
Tenant ID | Copy from script output - this is the TenantID for your AzureAD |
Tenant User Id | Copy from the script output - this is the GUID for the user that ran the script |
Tenant User Name | This is the account used to register the application and create the exchange online token |
Application ID | Copy from the script output – this is the Unique identifier for the application created in Azure. |
Application Secret | Copy from the script output. |
Refresh Token | Copy from the script output. |
Exchange Application ID | Copy from the script output. |
Exchange Application Secret | Copy from the script output. |
Exchange Refresh token | Copy from the script output. |
The screen should look something like the below – press Save and your connection should be set up and ready to go!
Sync Microsoft Offerings
- On the Atria Menu, navigate to Services > Microsoft Online > Offer Management
- Select the desired connection and press Sync Offers From Microsoft.
After configuring this, you may now proceed to Setup Customer Plans to begin configuring the Microsoft Online service.