Create a New Azure App Registration
This guide should only be performed once per Azure Tenant.
The App Registration should be created in the same tenant where the Azure Subscriptions are located.
This guide will walk you through the process of creating a new Azure App Registration in your Azure Tenant.
Prerequisites
In order to create a new Azure App Registration, you need the following prerequisites:
- An Active Azure Tenant.
- The following permissions Microsoft Entra ID Permissions:
microsoft.directory/applications/createAsOwner
microsoft.directory/oAuth2PermissionGrants/createAsOwner
microsoft.directory/servicePrincipals/createAsOwner
microsoft.directory/servicePrincipals/managePermissionGrantsForAll.microsoft-company-admin
(the listed permissions are part of theApplication Administrator
role)
- If you have Conditional Access Policies enabled, you need to ensure that the App Registration can bypass the policies.
(Please contact our support for more information)
Instructions
To create Chronom's App Registration, follow the steps below:
- Azure Portal
- Azure CLI (bash)
- Azure CLI (PowerShell)
-
Browse to the Application Registration Creation page in the Azure Portal.
(Make sure you are logged in to the correct Azure Tenant)tipIf the link does not work, you can navigate to the
Entra ID
service and click on theApp registrations
section inside Azure Portal,
then click on the+ New registration
button. -
Fill in the following details:
- Name:
Chronom Read-Only App Registration
- Supported account types:
Accounts in this organizational directory only (Microsoft only - Single tenant)
- Redirect URI:
- Platform:
web
- URI:
https://app.chronom.ai
- Platform:
- Click on the
Register
button.
- Name:
-
Once the App Registration is created, Take note of the following details:
- Application (client) ID
- Directory (tenant) ID
-
Navigate to the
API permissions
section under theManage
on the left-hand side menu.
(If you already have theUser.Read
permission, you can skip to step 9.) -
Click on the
+ Add a permission
button and selectMicrosoft Graph
from the list of APIs. -
Select
Delegated permissions
and search forUser.Read
in the search bar. -
Under the
User
category, select theUser.Read
permission and click on theAdd permissions
button. -
Click on the
+ Add a permission
button and selectMicrosoft Graph
from the list of APIs. -
Select
Application permissions
and search forDirectory.Read.All
in the search bar. -
Under the
Directory
category, select theDirectory.Read.All
permission and click on theAdd permissions
button. -
Click on the
Grant admin consent for <Your Tenant>
button to grant the permissions and confirm by clickingYes
. -
Navigate to the
Certificates & secrets
section under theManage
on the left-hand side menu. -
Click on the
+ New client secret
button under theClient secrets
tab and fill in the following details:
- Description:
Chronom Read-Only Secret
- Expires:
730 days (24 months)
- Click on the
Add
button.
- Once the secret is created, take note of the
Value
as it will be used to authenticate the App Registration in Chronom.
Handle with Extreme Care!
Client Secret is considered a highly sensitive credential.
Make sure to store it in a secure location and only share it via Chronom's Integrations Page.
Chronom will never ask you for your Client Secret via email or any other communication channel.
Do not share your Client Secret with anyone else.
The Client Secret is only displayed once after creation.
15. On a new tab, navigate to Chronom's Integrations Page and click on the
+ Add a new Tenant
button.
16. Fill in the Details and click on the
Save
button:
- Tenant Name: The name of the Azure Tenant where the App Registration was created.
- Tenant ID: The Directory (tenant) ID of the App Registration.
- Application ID: The Application (client) ID of the App Registration.
- Client Secret: The Value of the Client Secret created in the previous step.
All steps bellow should be executed in the same bash session.
It is recommended to copy and paste the commands one by one to avoid any mistakes.
The steps bellow assume you have Azure CLI installed and configured with the necessary permissions.
If you haven't installed Azure CLI yet, you can follow the instructions here.
-
If not already installed, install jq by following the instructions here.
-
Authenticate Azure CLI with the Tenant where your subscriptions are by running the following command:
az login
-
Create the App Registration by running the following command:
appRegistration=$(az ad app create --display-name "Chronom Read-Only App Registration" \
--sign-in-audience "AzureADMyOrg" \
--web-redirect-uris "https://app.chronom.ai")
clientId=$(echo $appRegistration | jq -r '.appId')
tenantId=$(az account show --query tenantId -o tsv)
echo "Application (client) ID: $clientId"
echo "Directory (tenant) ID: $tenantId" -
Grant
User.Read
API Permissions to the App Registration by running the following command:az ad app permission add --id "$clientId" \
--api 00000003-0000-0000-c000-000000000000 \
--api-permissions e1fe6dd8-ba31-4d61-89e7-88639da4683d=Scope
az ad sp create --id $clientId
az ad app permission grant --id $clientId --api 00000003-0000-0000-c000-000000000000 --scope "User.Read" -
Grant
Directory.Read.All
API Permissions to the App Registration with Admin Consent by running the following command:az ad app permission add --id "$clientId" \
--api 00000003-0000-0000-c000-000000000000 \
--api-permissions 7ab1d382-f21e-4acd-a863-ba3e13f7da61=Role
az ad app permission admin-consent --id $clientId -
Create a new client secret by running the following command:
dangerHandle with Extreme Care!
Client Secret is considered a highly sensitive credential.
Make sure to store it in a secure location and only share it via Chronom's Integrations Page.
Chronom will never ask you for your Client Secret via email or any other communication channel.
Do not share your Client Secret with anyone else.clientSecret=$(az ad app credential reset --id "$clientId" \
--display-name "Chronom Read-Only Secret" \
--years 2)
clientSecretValue=$(echo $clientSecret | jq -r '.password')
echo "Client Secret Value: $clientSecretValue" -
Navigate to Chronom's Integrations Page and click on the
+ Add a new Tenant
button. -
Fill in the Details and click on the
Save
button:- Tenant Name: The name of the Azure Tenant where the App Registration was created.
- Tenant ID: The Directory (tenant) ID of the App Registration.
- Application ID: The Application (client) ID of the App Registration.
- Client Secret: The Value of the Client Secret created in the previous step.
The complete Bash script
#!/bin/bash
# Authenticate Azure CLI
az login
# Create the App Registration
appRegistration=$(az ad app create --display-name "Chronom Read-Only App Registration" \
--sign-in-audience "AzureADMyOrg" \
--web-redirect-uris "https://app.chronom.ai")
clientId=$(echo $appRegistration | jq -r '.appId')
tenantId=$(az account show --query tenantId -o tsv)
# Grant User.Read API Permissions
az ad app permission add --id "$clientId" \
--api 00000003-0000-0000-c000-000000000000 \
--api-permissions e1fe6dd8-ba31-4d61-89e7-88639da4683d=Scope
az ad sp create --id $clientId
az ad app permission grant --id $clientId --api 00000003-0000-0000-c000-000000000000 --scope "User.Read"
# Grant Directory.Read.All API Permissions
az ad app permission add --id "$clientId" \
--api 00000003-0000-0000-c000-000000000000 \
--api-permissions 7ab1d382-f21e-4acd-a863-ba3e13f7da61=Role
az ad app permission admin-consent --id $clientId
# Create a new client secret
clientSecret=$(az ad app credential reset --id "$clientId" \
--display-name "Chronom Read-Only Secret" \
--years 2)
clientSecretValue=$(echo $clientSecret | jq -r '.password')
# Output the App Registration details
echo
echo "Application (client) ID: $clientId"
echo "Directory (tenant) ID: $tenantId"
echo "Client Secret Value: $clientSecretValue"
All steps bellow should be executed in the same PowerShell session.
It is recommended to copy and paste the commands one by one to avoid any mistakes.
The steps bellow assume you have Azure CLI installed and configured with the necessary permissions.
If you haven't installed Azure CLI yet, you can follow the instructions here.
-
Authenticate Azure CLI with the Tenant where your subscriptions are by running the following command:
az login
-
Create the App Registration by running the following command:
$appRegistration = az ad app create --display-name "Chronom Read-Only App Registration" `
--sign-in-audience "AzureADMyOrg" `
--web-redirect-uris "https://app.chronom.ai" | ConvertFrom-Json
$clientId = $appRegistration.appId
$tenantId = (az account show --query tenantId -o tsv).Trim()
Write-Host "Application (client) ID: $clientId"
Write-Host "Directory (tenant) ID: $tenantId" -
Grant
User.Read
API Permissions to the App Registration by running the following command:az ad app permission add --id $clientId `
--api 00000003-0000-0000-c000-000000000000 `
--api-permissions e1fe6dd8-ba31-4d61-89e7-88639da4683d=Scope
az ad sp create --id $clientId
az ad app permission grant --id $clientId --api 00000003-0000-0000-c000-000000000000 --scope "User.Read" -
Grant
Directory.Read.All
API Permissions to the App Registration with Admin Consent by running the following command:az ad app permission add --id $clientId `
--api 00000003-0000-0000-c000-000000000000 `
--api-permissions 7ab1d382-f21e-4acd-a863-ba3e13f7da61=Role
az ad app permission admin-consent --id $clientId -
Create a new client secret by running the following command:
dangerHandle with Extreme Care!
Client Secret is considered a highly sensitive credential.
Make sure to store it in a secure location and only share it via Chronom's Integrations Page.
Chronom will never ask you for your Client Secret via email or any other communication channel.
Do not share your Client Secret with anyone else.$clientSecret = az ad app credential reset --id $clientId `
--display-name "Chronom Read-Only Secret" `
--years 2 | ConvertFrom-Json
$clientSecretValue = $clientSecret.password
Write-Host "Client Secret Value: $clientSecretValue" -
Navigate to Chronom's Integrations Page and click on the
+ Add a new Tenant
button. -
Fill in the Details and click on the
Save
button:- Tenant Name: The name of the Azure Tenant where the App Registration was created.
- Tenant ID: The Directory (tenant) ID of the App Registration.
- Application ID: The Application (client) ID of the App Registration.
- Client Secret: The Value of the Client Secret created in the previous step.
The complete PowerShell script
# Authenticate Azure CLI
az login
# Create the App Registration
$appRegistration = az ad app create --display-name "Chronom Read-Only App Registration" `
--sign-in-audience "AzureADMyOrg" `
--web-redirect-uris "https://app.chronom.ai" | ConvertFrom-Json
$clientId = $appRegistration.appId
$tenantId = (az account show --query tenantId -o tsv).Trim()
# Grant User.Read API Permissions
az ad app permission add --id $clientId `
--api 00000003-0000-0000-c000-000000000000 `
--api-permissions e1fe6dd8-ba31-4d61-89e7-88639da4683d=Scope
az ad sp create --id $clientId
az ad app permission grant --id $clientId --api 00000003-0000-0000-c000-000000000000 --scope "User.Read"
# Grant Directory.Read.All API Permissions
az ad app permission add --id $clientId `
--api 00000003-0000-0000-c000-000000000000 `
--api-permissions 7ab1d382-f21e-4acd-a863-ba3e13f7da61=Role
az ad app permission admin-consent --id $clientId
# Create a new client secret
$clientSecret = az ad app credential reset --id $clientId `
--display-name "Chronom Read-Only Secret" `
--years 2 | ConvertFrom-Json
$clientSecretValue = $clientSecret.password
# Output the App Registration details
write-host
Write-Host "Application (client) ID: $clientId"
Write-Host "Directory (tenant) ID: $tenantId"
Write-Host "Client Secret Value: $clientSecretValue"