Create an App Service for the Exchange Online Microservice
As part of the deployment process for the Exchange Online microservice, an app service needs to be created to host the microservice and configured with a system-assigned managed identity. The Exchange Online V2 PowerShell Microservice uses a certificate to authenticate against Azure AD while requesting an access token to interact with Exchange Online. The managed identity for the app service hosting the microservice is the Azure principal that will be given permission to download and read the certificate.
Create the app service
Log in to your Azure portal as a user with the necessary permissions to create an app service.
In Azure, navigate to All Services > App Services and create an App Service.
Under Project Details, select a Subscription and create a new Resource Group for the app service.
Under Instance Details, do the following:
Name – Enter a name for the app service.
Publish – Select Code.
Runtime Stack – Select .NET Core 3.1 (LTS).
Operating System – Select Linux.
Region – Select the appropriate region.
Click Review + Create.
Click Create.
After the deployment of the app service completes, click Go to resource.
Change the platform for the app service to 64 Bit by doing the following:
On the app service navbar, under Settings, click Configuration.
On the Configuration blade, select the General settings tab.
Under Platform settings, change the Platform to 64 Bit and click Save.
Click Continue to confirm you want to save the changes.
On the Overview page, copy and save the URL for the app service. You will need this later.
Configure authentication
Navigate to the Authentication blade for the app service and click Add identity provider.
Select Microsoft.Â
On the Add an identity provider page, do the following:
App registration type – Select Pick an existing app registration in this directory.
Name or app ID – Select the service principal you created to provide Azure AD authentication for the Exchange microservice.
Issuer URL – Enter
https://login.microsoftonline.com/<Your Tenant ID>
Authentication – Select Require authentication.
Unauthenticated requests – Select HTTP 401 Unauthorized: recommended for APIs.
Token Store – Leave selected.
Click Add.
Â
After adding the Identity provider, click the Edit link for it.
Â
Set the Issuer URL to
https://login.microsoftonline.com/<Your Tenant ID>
.Under Allowed token audiences enter the URL for the app service.
Â
Click Save.
Create a managed identity for the app service
Navigate to the Identity blade for the app service.
Turn on System assigned to create the managed identity.
Click Save and then click Yes to confirm you want to enable system assigned managed identity.
Â
Download the publish profile for the app service
Navigate to the Overview page for the app service.
Click Get publish profile and save the file to your machine. You use this file when publishing the Exchange Online microservice to Azure.
Â
Â
Next Steps
Create a key vault for the Exchange Online Microservice
IN THIS ARTICLE