There was an error while loading. Please reload this page.
Gem natively don't support Multi Tenant setup
you need to Monkey Patch gem (till this is fixed)
module OmniAuth module Strategies class AzureActiveDirectory def raw_authorize_endpoint_url 'https://login.microsoftonline.com/common/oauth2/authorize' end def authorize_endpoint_url uri = URI(raw_authorize_endpoint_url) uri.query = URI.encode_www_form(client_id: client_id, redirect_uri: callback_url, response_mode: response_mode, response_type: response_type, nonce: new_nonce) uri.to_s end def verify_options { verify_expiration: true, verify_not_before: true, verify_iat: true, verify_aud: true, 'aud' => client_id } end end end end
discussion here https://github.com/AzureAD/omniauth-azure-activedirectory/issues/25