Annex 2: Create a Service Principal for Azure Communication Services
In some Microsoft Tenants there is no access to Azure Communication Services by default. In these tenants a Service Principal should be created. Please follow below steps for this.
Warning
The Microsoft Graph PowerShell SDK will be used. See Install the Microsoft Graph PowerShell SDK | Microsoft Learn for the latest prerequisites of Microsoft.
Install the Microsoft Graph PowerShell SDK
-
Open PowerShell with Elevated Permissions
Important
You cannot use Windows PowerShell
- Make sure to use 64-bit version of PowerShell
- Make sure you have admin privileges
- Right-click PowerShell and click Run as Administrator
-
Run the following PowerShell command to verify whether the Microsoft Graph PowerShell SDK is installed
-
Run the following PowerShell command to install the Microsoft Graph PowerShell SDK
-
Optionally, you will be prompted to confirm installing the module (in case there is no trusted PowerShell Repository configured). Select Yes or Yes to all
-
Wait for the installation to complete
-
Re-run the following PowerShell command to verify whether the Microsoft Graph PowerShell SDK is installed
Create a Service Principal for Azure Communication Service
When the Microsoft Graph PowerShell SDK is installed, the following steps should be executed to create a Service Principal.
-
Open PowerShell (no Elevated Permissions are needed)
Important
You cannot use Windows PowerShell
- Make sure to use 64-bit version of PowerShell
-
Run the following PowerShell command to load in the MsGraph module:
-
Login with a Microsoft User Account that has either one of these permissions
- Global Administrator; or
- Application Administrator
To learn how to assign user roles with Azure Active Directory please visit:
Steps to assign an Azure role - Azure RBAC -
Run the following PowerShell command to create a Service Principal for Azure Communication Service
-
Run the following PowerShell command to validate whether the Service Principal for Azure Communication Service is created successfully