Create an EntraID app to allow user enablement

After a recent incident, I decided that it would be a good idea to have an EntraID app that I could use to re-enable a users inside a tenant if I needed. This will allow me to login to EntraID without being depended on a user account as I would be logging in using this app directly.

image

The first step in that process is to navigate to EntraID as an administrator in the Azure portal and select App registrations from the menu on the left and then New registration on the right as shown above.

image

Simply give the app a name and select Register as shown above.

image

When you will then be taken to new app overview page as shown above. Take a moment to record the:

– Application (client ID)

– Object ID

– Directory tenant ID

image

Next, select Certificates & secrets from the menu on the left as shown above.

image

Select New client secret on the right as shown above.

image

Give the secret a name and select the duration for that secret from the list available as shown.

image

Take a moment to copy this secret as this is the only time that it will be available. If you don’t take a copy here you’ll need to generate a new secret.

image

From the menu on the left select API permissions as shown above. Then select Add a permission on the right.

image

Select the option for the Microsoft Graph as shown.

image

Select Application permissions.

Add the following permissions:

– User.ManageIdentities.All

– User.EnableDisableAccount.All

– User.ReadWrite.All

– Directory.ReadWrite.All

image

Select Grant admin consent.

image

Select Yes in the dialog that appears.

image

You should now see all the permissions have been consented to as shown above.

The EntraID app has now been created and is ready for use. This will used to login to with PowerShell and then enable any disabled user.


5 thoughts on “Create an EntraID app to allow user enablement

Leave a comment