简体   繁体   English

Azure AD 中的 SAAS 权限

[英]Permissions for SAAS in Azure AD

I am looking to develop a SAAS product where tenant from different organizations can log into my application and there are specific set of custom Permissions that I want to create for my application which will allow users to access different endpoints in my application.我希望开发一个 SAAS 产品,来自不同组织的租户可以登录到我的应用程序,并且我想为我的应用程序创建一组特定的自定义权限,这将允许用户访问我的应用程序中的不同端点。

Application is hosted in a inhouse server.应用程序托管在内部服务器中。

Can someone please help me to understand what would be my approach to do so?有人可以帮助我了解我这样做的方法是什么吗?

I am doing App Registration in Azure AD.我正在 Azure AD 进行应用程序注册。 And in the redirect uri I am passing my application url. I am stuck after that.在重定向 uri 中,我传递了我的应用程序 url。在那之后我被卡住了。

I tried to reproduce the same in my environment and got the results like below:我尝试在我的环境中重现相同的内容并得到如下结果:

To integrate the SaaS Application in Azure AD, Register an Application in Azure AD.要在 Azure AD 中集成 SaaS 应用程序,请在 Azure AD 中注册一个应用程序。

As you need tenant from different organizations log into the application, make sure to configure the Application as Multi-Tenant like below:由于您需要来自不同组织的租户登录到应用程序,请确保将应用程序配置为Multi-Tenant ,如下所示:

在此处输入图像描述

Based on your requirement you can select the API permission which you want the users to access like below:根据您的要求,您可以 select 您希望用户访问的API 权限如下所示:

在此处输入图像描述

For sample , I selected Microsoft Graph and added the required API permissions:对于示例,我选择了 Microsoft Graph 并添加了所需的 API 权限:

在此处输入图像描述

You can choose Delegated or Application API permissions based the Grant Flows.您可以根据授予流程选择委派或应用程序 API 权限。

For Client-Credentials, need to grant Application API permissions and for Authorization Code Flow need to grant Delegated API permissions.对于 Client-Credentials,需要授予 Application API 权限,对于 Authorization Code Flow,需要授予 Delegated API 权限。

For sample, I am using OAuth 2.0 authorization code flow to generate the token for authentication.例如,我使用OAuth 2.0 授权代码流来生成用于身份验证的令牌。

I generated Auth-Code using below authorize endpoint:我使用以下授权端点生成了授权码:

在此处输入图像描述

This will authorize the request and redirect it to the application.这将授权请求并将其重定向到应用程序。

I generated the token using below parameters:我使用以下参数生成了令牌:

在此处输入图像描述

Using the above generated Access token, you can call Microsoft Graph API.使用上面生成的访问令牌,您可以调用 Microsoft Graph API。

If you want B2B collaboration , refer to the document provided by bahrep in the comments.如果要B2B协作,参考评论中bahrep提供的文档。

References:参考:

Register a SaaS application - Azure Marketplace | 注册 SaaS 应用程序 - Azure 市场 | Microsoft Learn 微软学习

Microsoft identity platform and OAuth 2.0 authorization code flow - Microsoft Entra 微软身份平台和OAuth 2.0授权码流程-Microsoft Entra

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM