【问题标题】:Create API to authenticate users to azure active directory创建 API 以对用户进行身份验证以访问 Azure Active Directory
【发布时间】:2021-04-25 18:54:35
【问题描述】:

我正在尝试使用 .net 核心创建 API,以对用户进行身份验证以访问 Azure Active Directory 并获取响应中的令牌。

用户将能够使用他们的用户名和密码向我的 api 发送发布请求,我将代表他们登录到 azure 活动目录。

有什么建议吗?

【问题讨论】:

    标签: azure .net-core azure-active-directory


    【解决方案1】:

    尝试请求此作为授权响应。

    POST http://login.microsoftonline.com/{tenant}/oauth2/v2.0/token
    Content-Type: application/x-www-form-urlencoded
    
    client_id={client_id}
    &scope=user.read openid profile offline_access
    &username={username}
    &password={password}
    &grant_type=password
    

    更多详情请见here

    【讨论】:

      猜你喜欢
      • 2017-01-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多