Community in read only mode June 18 & 19
This community will be set in READ ONLY mode for a while on Tuesday June 18 into Wednesday June 19 while we import content and users from our Micro Focus Forums community site. MORE INFORMATION

Creating the application Client ID and Client Secret from Microsoft Azure old portal - Part 2

Creating the application Client ID and Client Secret from Microsoft Azure old portal - Part 2

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.

Login to the Old Windows Azure portal


 
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:

  • Login to https://manage.windowsazure.com

  • Go to Active Directory tab on the left pane as shown in the image below.
     
    Active directory tab Active directory tab



  • Click on the New button and then browse to App Services -->Active Directory-->Directory-->Custom Create, as shown below.
     
    Directory


  • Once you click on the Custom Create option a window appears with text boxes as shown below.
     
    add directory

  • Enter the fields with your required values for your organization and click on complete (or tick mark).

  • Once you enter all the details and select "OK" you will see a screen like below.
     
    Once you select Ok, the window appears to look like

  • Now, select/click the directory you have created here it is "Testname".

  • Go to Applications window.
     
    click on applications

  • Click on +Add option present below, once you click you can see a window as shown below.
     
    app1

  • Select the first option i.e. Add an application my organization is developing as seen above.

  • Provide a suitable meaningful name for your application ,makes sure you select WEB APPLICATION AND/OR WEB API Ex: testapifordriver and click next ->
     
    app2


  • App properties should be entered, Enter SIGN-ON URL and APP ID URI (click on ? to get more info on these terms)
     
    app3

  • Once you finish with these steps you will be redirected to a page as shown below.
     
    app5


  • Once you are on this page go to Configure on the top of the page which looks like the image below.
     
    testwindow

  • Now in the page you can see CLIENT ID for your application, copy it to your clipboard / notepad which will be referred in future.

    For Example: The Client ID looks like:


    Client ID: bce43b27-e7ef-4f92-b2f7-ce673516e073




  • Scroll down the page to see Keys which will be your Client Secret.
     
    client secret1

  • Select 1 or 2 years depending on your requirement, which looks like below. Save the page to see the Key /Client Secret.
     
    key1


  • Once you save, the key will appear which is generated only once, copy the key /Client Secret to your Clipboard.

    For Example: The Client Secret looks like:


    Client Secret: 6zMnJe1XCYUQIJv4aPQHLu4fokcd6aOA/j9gMkJJ2Gc=



  • Now this Client ID and Client Secret will be used for your driver configurations or any other rest clients. After which you can exit the page.



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:

Providing rights to your Client ID / application via PowerShell


 
Open PowerShell as Administrator and run the following commands in the order mentioned below:


  1. Connect to the Office 365 Exchange Online service using the following command and provide your exchange login credentials:
    Connect-MSolService

    Note: If you don't get any error messages assume login is successful.

  2. Run the following commands in Power Shell.Running the command below will list all the Client IDs in the Azure application. <AppPrincipalID> should be replaced with your Client ID:
    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'

  3. Run the following command to assign the "Company Administrator" rights to your application (Client ID), copy the commands below:
    $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:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2017-02-23 17:52
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.