...
Go to Azure portal and log in.
Click on Azure Active Directory on the left-hand side navigation.
Navigate to App registrations
Click on New registration at the top
Give your application registration a Name that describes your app or purpose
Select the default option for supported account types.
Step - 2: Setting Permissions
Now your application registration has been created, we need to configure the permissions for Graph API. To do that follow these steps:
Click on API permissions on the left
Click Add a permission
Select Microsoft Graph
Then choose application permissions.
In the Select permissions section, search for and select the permissions mentioned below:
User.ReadWrite.All
Group.ReadWrite.All
Organization.Read.All
Application.ReadWrite.All
Directory.ReadWrite.All
Finalize the permission settings by clicking Add permissions and then Grant admin consent (if you selected permissions that require admin consent). Note that if you are not an admin, you won’t be able to complete the last step yourself, but need to ask your admin friend to click on the button for you.
Step - 3: Creating the Client Secret
The last thing we need to set up is the client secret.
On the left, click on Certificates & secrets
Click on New client secret
Fill in the Description. It can be anything you like but I recommend you mention OnLink where the secret is going to be used.
Set an Expiration date.
Press Add and copy the Value to a safe place (preferably Azure Key Vault). It is a password, so handle it with care. Copying the key value now is important because after you close the view, you won’t be able to see the key value again. If you lose the secret, you have to create a new one.
...
Directory (tenant) ID. This can be seen on the Overview blade.
Application ID, referred to as Client ID on OnLink. This can be seen on the Overview blade.
And finally, you need the client secret. You should have already copied it somewhere earlier right after you created it in Step 3 above, but if you didn’t, create a new one.
...