To register and configure an API, follow these steps:
-
Log in to the Azure portal as an administrative user. On the dashboard, click App registration > New registration.
-
Enter a name for the API and select the support account types.
-
Click Register.
The app is registered, and an app page with the API name is created.
-
In the left navigation, click Token configuration > Add optional claim.
-
For Token type, select Access.
-
For Claim, select aud.
If you want to map users with Smart Completions user email, select email in the Claim options.
-
Click Add.
-
On the dialog box that appears, select Turn on the Microsoft Graph email permission (required for claims to appear in token), and then click Add.
-
In the left navigation, click Expose an API.
-
In the Application ID URI, click Set. The URI is filled in. This must be the same as the Application (client) ID.
-
Click Save.
-
Copy the Application (client) ID.
-
Click Add a scope and paste the application client ID in scope name.
-
Enter other details as required.
-
For State, select enable.
-
Click Add scope.
The app registration and configuration for the API is complete.