4.3 Manage Users and Role Assignments in Microsoft Entra ID
Create two test users and assign them distinct application roles to simulate an organizational hierarchy in a sample HR application schema.
- Create new test users in your Microsoft Entra ID domain.
- On the Microsoft Entra portal's Home page, click Users in
the left navigation pane under Entra ID.The Users page opens.
- Click New user, and then Create new user.
- Create the first user (Marvin) with the
following details:
- User principal
name:
marvin@<your-directory>.onmicrosoft.com - Display
name:
marvin - Password: Set a password for the user
- Account enabled: Leave this field checked
Click Review + create, and then click Create. From the Users page, copy Marvin's full user principal name (UPN).
- User principal
name:
- Create the second user (Emma) with the
following details:
- User principal
name:
emma@<your-directory>.onmicrosoft.com - Display
name:
emma - Password: Set a password for the user
- Account enabled: Leave this field checked
Click Review + create, and then click Create. From the Users page, copy Emma's full user principal name (UPN).
- User principal
name:
- On the Microsoft Entra portal's Home page, click Users in
the left navigation pane under Entra ID.
- Assign users to the database application in Entra ID to enable
sign-in.Select specific application roles to define their data access privileges (manager or employee).
- In the left navigation pane under Entra ID, click Enterprise apps, and then select OracleDB_Resource.
- Click Assign users and groups in the Getting Started section of the application’s Overview page.
- On the Users and groups page, click Add user/group to assign a new user to the application.
- To assign Marvin, perform the following
actions:
- Select Marvin under Users.
- Select Manager under Select a role.
- Click Assign.
- Repeat the steps for Marvin, but this time, add the Employee role.
- To assign Emma, perform the following
actions:
- Select Emma under Users.
- Select Employee under Select a role.
- Click Assign.
- Initialize Microsoft Entra ID users.New users you created in Microsoft Entra ID have temporary passwords. Update these to permanent passwords in a browser before attempting to sign in with SQL*Plus, as SQL*Plus cannot handle the Force Change Password prompt.
- Open a private or incognito browser window.
- Go to
https://myapps.microsoft.com. - Sign in as Marvin using the user principal name
(
marvin@<your-directory>.onmicrosoft.com) and the temporary password, then change the password. - If the sign-in flow requires additional
security, follow the prompts to configure the
Microsoft Authenticator app as your second
verification method.When the My Apps dashboard appears, close the browser. The user is now active.
- Repeat the previous steps to set a permanent password to Emma.