This is the continuation of Creating the application Client ID and Client Secret from Microsoft Azure new portal – Part 1 which guides you to generate Client ID and Client Secret from the Microsoft Azure New portal. In this post we will guide you to generate Client ID and Client Secret from the Microsoft Azure Old portal.
People who use any of the portal, old or new, might face difficulties in generating the IDs due to changes in the UI from Microsoft in recent times. This post will guide you step by step to get your app registered and generate IDs.
If you already have a user account in your Azure tenant, or if you signed in to the Azure portal with a Microsoft account and have never created or used Active directory application, follow the steps below:
For Example: The Client ID looks like:
Client ID: bce43b27-e7ef-4f92-b2f7-ce673516e073
For Example: The Client Secret looks like:
Client Secret: 6zMnJe1XCYUQIJv4aPQHLu4fokcd6aOA/j9gMkJJ2Gc=
Once the app is ready you have to provide rights for your application or else you will not have permissions to delete objects from your driver using this client ID and secret.
Follow the steps below to provide permissions to your app:
Open PowerShell as Administrator and run the following commands in the order mentioned below:
Note: If you don’t get any error messages assume login is successful.
General Syntax: Get-MsolServicePrincipal | ft DisplayName, <AppPrincipalId> -AutoSize
For Example: Get-MsolServicePrincipal | ft DisplayName, 8b523s82-09d3-464e-af4f-28c82923e0m1 -AutoSize
General Syntax: $ClientIdWebApp = '<AppPrincipalId>'
For Example: $ClientIdWebApp = ‘8b523s82-09d3-464e-af4f-28c82923e0m1’
$webApp = Get-MsolServicePrincipal –AppPrincipalId $ClientIdWebApp Add-MsolRoleMember -RoleName "Company Administrator" -RoleMemberType ServicePrincipal -RoleMemberObjectId $webApp.ObjectID
Note: The Company Administrator role will give you complete rights to your application.
Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment. It just worked for at least one person, and perhaps it will be useful for you too. Be sure to test in a non-production environment.