In this step you will register a new application on Azure with appropriate permissions, create client secrets and gather information in your notepad for the next steps.
1. Create the application
In the Azure portal home screen, open the side menu and click Microsoft Entra ID.

Now, from the side menu click Manage > App registration.
The App registration menu opens.From the upper menu, click New registration.

The Register an application window opens.Under the Name field, enter a descriptive name.
Click Register.
2. provide API permissions
From the side menu, click API permissions > + Add a permission.

The Request API permissions panel opens.Scroll down to locate the Microsoft Graph tile and click on it.
Select the Delegated permissions type and
Search for ExchangeMessageTrace and select ExchangeMessageTrace.Read.All.In Microsoft Graph again, Now select the Application permissions type and
Search for ExchangeMessageTrace and select ExchangeMessageTrace.Read.All.Click Add permissions to close the panel and return to the application window.
Click Grant admin consent for directory to grant admin permissions.
Provision the service principal (required)
The Message Trace API requires a service principal for the Microsoft Transport Data Platform app in your tenant.
Without it, the API returns 401 and ingestion will not work.
Install the [Microsoft Graph PowerShell SDK](https://learn.microsoft.com/en-us/powershell/microsoftgraph/installation) and run:
powershell Connect-MgGraph -Scopes "Application.ReadWrite.All"Create the service principal:
powershell New-MgServicePrincipal -AppId 8bd644d1-64a1-4d4b-ae52-2e0cbf64e373Disconnect when done:
Disconnect-MgGraph.
Provisioning can take some time to take effect (up to a few hours in large tenants).
If you get 401 after completing the rest of the setup, wait and retry, or confirm the service principal exists in Microsoft Entra ID → Enterprise applications (search for the app ID8bd644d1-64a1-4d4b-ae52-2e0cbf64e373).
3. Create client secret
From the side menu, click Certificates & secrets.
Click New client secret to open the client secret panel.

In the Description field, enter a descriptive title.
From the Expires dropdown list, select 24 months.
Click Add to add the secret.

The secret now appears under the Client secrets list.Copy the client secret Value and Secret ID to a notepad for later use.

❗️IMPORTANT
After a while, the client secret value will be hidden from view and you will not be able to retrieve it again.
4. Retrieve Tenant ID and Application ID
From the side menu, click Overview.
Locate the Application (client) ID and Directory (tenant) ID.
.png?sv=2022-11-02&spr=https&st=2026-04-03T20%3A03%3A36Z&se=2026-04-03T20%3A14%3A36Z&sr=c&sp=r&sig=ESAuIkGIddUsNGJpADooECKeZRdnDkHAYJQAmydLjy4%3D)
Copy and paste these values into a notepad for later use.
Finally, to provide Hunters with the required keys, follow this guide. Make sure to provide the following details:
Client ID
Client Secret
Tenant ID