Create Application Registrations in Microsoft Entra ID
In your Entra ID Default Directory, create two application registrations: one for your database (resource) and one for SQL*Plus (client). This step establishes trust between your client application, database resource, and Microsoft Entra ID.
Note: The Microsoft Entra portal interface may be updated over time. If a specific label or navigation path differs from the instructions provided here, look for the closest matching option.
Register the Database Resource
Register your database by creating an application in Microsoft Entra ID so that access tokens can be issued specifically for the database. Subsequently, expose the database application as a web API to manage client access, and define your application-specific roles that govern user permissions.
-
Create an application registration in Microsoft Entra ID to represent the database.
-
Log in to the Microsoft Entra Portal.
-
In the left navigation pane, expand Entra ID, click App registrations, and then click New registration.
-
Perform the following tasks on the Register an application page:
-
Enter
OracleDB_Resourcein the Name field. -
For Supported account types, select Single tenant only - Default Directory.
-
Click Register.
The application is successfully created for your database.
-
-
From the application’s Overview page, copy and save the following values for later use:
-
Application (client) ID (referenced later as
[DB_APP_ID]). -
Directory (tenant) ID (referenced later as
[TENANT_ID]).
-
-
-
Expose the database application as a web API, and define a scope to control access for client applications.
-
On the application’s Overview page, click Add an Application ID URI.
The Expose an API page opens.
-
Add an application ID URI.
-
Click Add next to Application ID URI.
-
In the panel that appears, update the default URI by replacing
api://withhttps://<your-entraID-domain>/, then click Save.The resulting application ID URI should resemble:
https://supremo.onmicrosoft.com/fe58fefb-0925-4c8f-9b14-598a0d2f4552. -
Copy this URI for later use (referenced later as
[DB_APP_ID_URI]).
-
-
Add a scope.
-
Under Scopes defined by this API, click Add a scope.
-
In the panel that appears, enter the following information:
-
Scope name:
sessions:scope:connect. -
Who can consent: Select Admins and users.
-
Enter
Access Oracle Databaseas the value in all remaining fields. -
Click Add scope.
-
-
-
-
Define application-specific roles in Entra ID to centrally manage job functions (for example, manager or employee).
Later, you can create data roles in the database and map them to these roles.
-
On the
OracleDB_Resourceapplication page, under Manage, click App roles.The App roles page opens.
-
Click Create app role to create the Manager role:
-
Display name: Enter
MANAGER. -
Allowed member types: Select Users/Groups.
-
Value: Enter
MANAGER. -
Description: Enter
Full access to all records. -
Click Apply.
-
-
Click Create app role to create the Employee role:
-
Display name: Enter
EMPLOYEE. -
Allowed member types: Select Users/Groups.
-
Value: Enter
EMPLOYEE. -
Description: Enter
Access to own records only. -
Click Apply.
-
-
Register the Client Application
Register SQL*Plus by creating an application in Microsoft Entra ID, and authorize it to request access tokens for your database on behalf of signed-in users.
-
Create an application registration in Microsoft Entra ID to represent SQL*Plus.
-
On the Microsoft Entra portal’s Home page, click App registrations in the left navigation pane under Entra ID, and then click New registration.
-
Perform the following tasks on the Register an application page:
-
Enter
SQLPlus_Clientin the Name field. -
For Supported account types, select Single tenant only - Default Directory.
-
Under Redirect URI, select Public client/native (mobile & desktop) from the drop-down field, and enter
http://localhost.Note: This URI allows the browser to return the authentication token to SQL*Plus running on your local machine.
-
Click Register.
The application is successfully created for your client.
-
-
From the application’s Overview page, copy and save the Application (client) ID (referenced later as
[CLIENT_APP_ID]).
-
-
Grant permissions to the client application.
You must explicitly authorize the client application (
SQLPlus_Client) to access the database application (OracleDB_Resource). This permission allows SQL*Plus to request valid authentication tokens on behalf of the signed-in user.-
On the
SQLPlus_Clientapplication page, under Manage, click API permissions, and then click Add a permission. -
Perform the following tasks on the Request API permissions panel:
-
Click APIs my organization uses, and then click OracleDB_Resource.
-
Select Delegated permissions and check the box for
sessions:scope:connect. -
Click Add permissions.
The permission is successfully added and appears on the API permissions page.
-
-
Click Grant admin consent for Default Directory (or your specific directory name) to authorize the permissions, and select Yes in the confirmation dialog box.
-