Create the application in Azure AD through the App Registrations blade using these criteria:

Enter a unique name for the application, such as "Graph API app"
Application Type
Web app / API
Sign-on URL
This field is not relevant for this particular use case, but is required by Azure AD. Enter the PingAccess host.
  1. After you create the application, navigate to the application in the list.
  2. Select Required permissions and click Add.
  3. Choose Windows Azure Active Directory, and then click Save.

    For Application Permissions, read the directory data.

  4. Copy the Application ID.
  5. Generate and copy a Key.