0
votes

I am trying to run the Sinatra sample app given in the Azure Active Directory Library for Ruby: https://github.com/AzureAD/azure-activedirectory-library-for-ruby. The sample is here: https://github.com/AzureAD/azure-activedirectory-library-for-ruby/tree/dev/samples/authorization_code_example

The provided README.md file tells me that I need to do this:

  1. Register a web application under your Azure Active Directory account.
  2. Replace CLIENT_ID, CLIENT_SECRET and TENANT with your values.

My problem is that it is not clear how to map any 3 of these values to the various fields available for the Web App that I have setup in Active Directory.

  • I am guessing that TENANT maps to a URL that will point my app to our ActiveDirectory configuration.

  • I am guessing that CLIENT_ID maps to the application id of my web app

  • I am very unsure about the CLIENT_SECRET

I am looking for clarity on these three fields and anything else I need to do to make this sample work.

1
I ended up using OAuth2.0 from scratch using this article: docs.microsoft.com/en-us/azure/active-directory/develop/… And not using the ADAL library for Ruby at all. - Ross Attrill

1 Answers

0
votes

This seems to work:

CLIENT_ID is the Application ID shown in the settings of the AD App Registration for the configured Web app.

CLIENT_SECRET is a password value a password set in the 'Keys' section of the Web app details.

TENANT should be a registered domain name for the AD tenant.
See: https://msdn.microsoft.com/Library/Azure/Ad/Graph/howto/azure-ad-graph-api-operations-overview?f=255&MSPPError=-2147217396#TenantIdentifier