Skip to content

Set up a Microsoft Entra app registration

Azure SQL Database, Azure Synapse, Microsoft Fabric and Azure Blob Storage all use Microsoft Entra ID to sign in. BInbox takes no SQL logins and no storage account keys, because a key opens a whole account to writes, while an Entra app can be given read on one database or one container. Make one app registration, then give it access in the service you use.

Field in BInbox Where it comes from
Directory (tenant) id The tenant’s id (a GUID), or a domain the tenant owns.
Application (client) id The app registration’s id (a GUID).
Client secret The secret’s value, which is not the same as its id.

Path 1: an app registration with a client secret

Section titled “Path 1: an app registration with a client secret”
Terminal window
az login
APP=$(az ad app create --display-name "BInbox reader" --query appId -o tsv)
az ad sp create --id $APP
az ad app credential reset --id $APP --append --display-name binbox --years 1

The last command prints appId (the Application (client) id), password (the Client secret, shown once) and tenant (the Directory (tenant) id). The secret ends in one year, so make a new one before then and use Change on the connection.

  1. Open Identity, Applications, App registrations, New registration. Name it BInbox reader, choose Accounts in this organizational directory only, and choose Register.
  2. On the overview page, copy Application (client) ID and Directory (tenant) ID.
  3. Open Certificates & secrets, New client secret, give it a description and an end date, and choose Add.
  4. Copy the secret’s Value now, because Microsoft shows it once. The Secret ID next to it is not the secret.

The app needs no API permissions and no admin consent, so remove any permissions it has.

Choose this only when BInbox tells you the issuer and subject to trust. Until BInbox gives each account its own token, its identity is shared by every account (see Connect a warehouse), so use Path 1.

The app registration trusts BInbox’s identity through a federated credential, and no secret is kept. In BInbox, choose BInbox’s own identity, trusted by the warehouse (no secret kept) and fill in Directory (tenant) id and Application (client) id only.

Terminal window
az ad app federated-credential create --id $APP --parameters '{
"name": "binbox",
"issuer": "<issuer>",
"subject": "<subject>",
"audiences": ["api://AzureADTokenExchange"]
}'

Making the app registration grants it nothing. Continue in the guide for the service you use:

BInbox only ever contacts login.microsoftonline.com to sign in. Sovereign clouds such as Azure Government and Azure China are not supported yet.