Azure Permissions
Use this guide to create the Microsoft Entra application used by the collector to call Microsoft Graph API.
Required Outcome
Section titled “Required Outcome”At the end you must have:
tenant_idclient_id- One authentication method:
client_secret, orclient_certificate_path(PEM with private + public key)
- Admin-consented Graph application permissions
Create the App Registration
Section titled “Create the App Registration”-
Open the Azure Portal and go to Microsoft Entra ID.
-
In Overview, copy your Tenant ID.
-
Open App registrations and click New registration.
-
Set a name (for example
MS Teams Observability) and select Accounts in this organizational directory only. -
Create the application and copy the Application (client) ID.
Configure Authentication
Section titled “Configure Authentication”- Open Certificates & secrets.
- In Client secrets, click New client secret.
- Copy the secret Value immediately after creation.
- Put this value in
microsoft_authentication.microsoft_client_secret.
- Open Certificates & secrets.
- In Certificates, upload the public certificate (
.cer,.pem, or.crt). - Keep a PEM file that contains both private and public keys for the collector host.
- Put the PEM path in
microsoft_authentication.microsoft_client_certificate_path.
Expected PEM layout:
-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY----------BEGIN CERTIFICATE-----...-----END CERTIFICATE-----Add Microsoft Graph API Permissions
Section titled “Add Microsoft Graph API Permissions”In API permissions:
- Click Add a permission.
- Choose Microsoft Graph.
- Choose Application permissions (not Delegated).
- Add:
CallRecords.Read.AllReports.Read.AllServiceHealth.Read.All
- Click Grant admin consent and confirm.
Validate Collector Configuration
Section titled “Validate Collector Configuration”Use one of the two authentication patterns below.
microsoft_authentication: microsoft_tenant_id: "<tenant-id>" microsoft_client_id: "<client-id>" microsoft_client_secret: "<secret>" microsoft_scope: "https://graph.microsoft.com/.default" microsoft_grant_type: "client_credentials"microsoft_authentication: microsoft_tenant_id: "<tenant-id>" microsoft_client_id: "<client-id>" microsoft_client_assertion_type: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer" microsoft_client_certificate_path: "/etc/ms-teams-observability-agent/graph.pem" microsoft_client_certificate_passphrase: "optional" microsoft_scope: "https://graph.microsoft.com/.default" microsoft_grant_type: "client_credentials"Then run:
./ms-teams-agent.bin --config ./conf/config.yaml --ignore_stateFor all available configuration fields, see Configuration.
VAAC Account (Auto Attendant & Call Queue)
Section titled “VAAC Account (Auto Attendant & Call Queue)”The microsoft_username and microsoft_password fields used for Auto Attendant and Call Queue collection (ms_teams_autoattendant_collection / ms_teams_callqueue_collection) are not the App Registration credentials. They refer to a dedicated Microsoft 365 user account that must be configured in Teams.
-
Create or designate a dedicated Microsoft 365 user account for the collector.
-
In the Microsoft Teams admin center, go to Voice > Voice applications policies.
-
Click Add to create a new custom policy. Grant it the minimum permissions needed (the global default policy grants no access and must not be used).
-
Assign the custom policy to the account via Manage users or with the PowerShell cmdlet:
Terminal window Grant-CsTeamsVoiceApplicationsPolicy -Identity "user@domain.com" -PolicyName "YourCustomPolicy" -
Set the account as an Authorized user on at least one Auto Attendant or Call Queue in Voice > Auto attendants / Call queues > Authorized users.