如何通过Azure AD运行第三方API?

发布于 2025-02-11 18:01:02 字数 100 浏览 2 评论 0 原文

我正在寻找一种通过Azure AD运行第三方的OAuth2(授权代码流)API的方法,因为我真的很喜欢.NET中的MSAL库,并且不想重新发明轮子。

有人知道这是否可能吗?

I am looking for a way to run a third-party's OAuth2 (Authorization Code flow) API through Azure AD, because I really like the MSAL library in .NET and wouldn't want to reinvent the wheel, so to speak.

Does anyone know if this is possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

痴意少年 2025-02-18 18:01:06

Azure Active Directory(Azure AD)支持所有OAUTH 2.0流。

使用OAuth1。转到Azure Active Directory,单击应用程序注册,然后单击新注册。在此处输入图像描述

  1. 仅在此组织目录中输入名称并选择帐户,然后单击OK

”在此处输入图像描述”

“在此处输入图像说明”

  1. 然后单击应用程序注册,然后单击新创建应用程序

    >

  2. 单击应用程序ID URI并设置此

”输入图像说明在此处”

  1. 复制此应用程序ID

  2. 创建角色

在此处输入图像描述“

”在此处输入图像描述

  1. 创建客户端并添加许可,然后单击默认目录的授予管理员同意,然后单击是

  1. net/xzcbw.png“ rel =“ nofollow noreferrer 步骤

  2. 单击证书&秘密,然后单击新客户秘密,然后输入描述和到期月,然后单击添加

”在此处输入映像说明“

”在这里输入映像说明”

  1. ​ID。

  1. 获取端点

”在此处输入图像描述

  1. 传递此值并获得令牌

  1. 将令牌传递给授权。

  1. 检查令牌打开jwt.ms

​src =“ https://i.sstatic.net/qmk6w.png” alt =“在此处输入图像描述”>

基础在此处输入链接描述

16 输入链接说明

基础 oauth 2.0 通过Microsoft文档使用Azure Active Directory身份验证

Azure Active Directory (Azure AD) supports all OAuth 2.0 flows.

Steps to use OAuth 1. Go to Azure Active Directory, the click on App registrations and then click New Registration. enter image description here

  1. Enter Name and select accounts in this organizational directory only and click ok

enter image description here

enter image description here

  1. Then click on App registration and click new create applications

  2. Click Application ID URi and set this

enter image description here

  1. Copy this Application Id

  2. Create role

enter image description here

enter image description here

  1. Create client and add permission then click on grant admin consent for default directory and then click on yes

enter image description here

  1. After above steps

  2. Click certificates & secrets and then click on new client secret and then enter description and expires month and click add

enter image description here

enter image description here

enter image description here

  1. Copy new client secret values and copy client id.

enter image description here

  1. Get Endpoints

enter image description here

  1. Passing this values and get token

enter image description here

  1. Pass token to Authorization.

enter image description here

  1. Check token open jwt.ms

enter image description here

enter image description here

Fundamental enter link description here

16: enter link description here

Fundamental OAuth 2.0 Authentication with Azure Active Directory by Microsoft Documents

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文