Ruby on rails 如何将microsoft graph api登录端点指定为特定于租户
我正在开发一个应用程序,它使用MicrosoftGraphAPI来提取数据和验证用户。我们将标志设置为AzureADMyOrg,并收到:AADSTS50194:应用程序。。。未配置为多租户应用程序。“2018年10月15日”之后创建的此类应用程序不支持使用/common endpoint。使用特定于租户的端点或将应用程序配置为多租户 在我看来,这意味着我需要使用他们的组织端点,但在ruby on rails中,我们在登录用户时会执行以下操作:Ruby on rails 如何将microsoft graph api登录端点指定为特定于租户,ruby-on-rails,microsoft-graph-api,endpoint,Ruby On Rails,Microsoft Graph Api,Endpoint,我正在开发一个应用程序,它使用MicrosoftGraphAPI来提取数据和验证用户。我们将标志设置为AzureADMyOrg,并收到:AADSTS50194:应用程序。。。未配置为多租户应用程序。“2018年10月15日”之后创建的此类应用程序不支持使用/common endpoint。使用特定于租户的端点或将应用程序配置为多租户 在我看来,这意味着我需要使用他们的组织端点,但在ruby on rails中,我们在登录用户时会执行以下操作: def sign_in redirect_to
def sign_in
redirect_to '/auth/microsoft_graph_auth'
end
我不确定在何处或如何指定登录端点以不使用/common端点,因为我似乎无法在我的代码或Azure广告门户中找到它。通过遵循关于如何设置Azure广告验证应用程序的从头开始的指南,我意识到我实际上已经指定了登录端点,在./lib/microsoft\u graph\u auth.rb中找到,我只是在那里更改了
#/lib/microsoft_graph_auth.rb
# Configure the Azure v2 endpoints
option :client_options,
site: 'https://login.microsoftonline.com',
authorize_url: '/common/oauth2/v2.0/authorize',
token_url: '/common/oauth2/v2.0/token'
到
#/lib/microsoft_graph_auth.rb
# Configure the Azure v2 endpoints
option :client_options,
site: 'https://login.microsoftonline.com',
authorize_url: '/<tenant name>/oauth2/v2.0/authorize',
token_url: '/<tenant name>/oauth2/v2.0/token'