5.4 Manage Users and Role Assignments
Create an end user called Emma in Microsoft Entra ID and assign her the
EMPLOYEE application role.
- Create the user.
- 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.
- On the Create new user page, enter 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 the user to the Spring Boot application in Entra ID to enable
sign-in.Select the specific application role to define their data access privileges (for example,
EMPLOYEE).- In the left navigation pane under Entra ID, click Enterprise apps, and then select EmployeeRecordsAPI.
- 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 user to the application.
- On the Add Assignment page, perform the following actions:
- Select Emma under Users.
- Select EMPLOYEE under Select a role.
- Click Assign.
- Initialize Microsoft Entra ID users.New users you create in Microsoft Entra ID have temporary passwords. Update these to permanent passwords in a browser before attempting to test this example scenario.
- Open a private or incognito browser window.
- Go to
https://myapps.microsoft.com. - Sign in as Emma using the user principal name
(
emma@<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 application as your second
verification method.When the My Apps dashboard appears, close the browser. The user is now active.