Microsoft Graph - Allow User Access to Application / Service Principal(Microsoft Graph - 允许用户访问应用程序/服务主体)
问题描述
我们正在向员工推出一个主要应用程序,它已设置为使用 Azure AD/SSO,我们目前必须手动设置每个用户才能通过 Azure AD 访问该应用程序 -> 应用程序-> 用户.我们有一个用于管理 AD 的小型 c# Web 应用程序,用户希望使用新的 Microsoft Graph API 在创建用户时将其设置为允许访问,但找不到要使用的正确端点/api 调用.
We are in the process of rolling out a major application to members of staff, it has been setup to use Azure AD/SSO and we currently have to manually set each user to have access to the application through Azure AD -> Applications -> Users. We have a small c# web application that we use to manage AD users are looking to use the new Microsoft Graph API to set users to allowed access when they are created but can't find the correct endpoint/api call to use.
我们尝试了以下方法,但返回的文档/错误非常缺乏.
We have tried the following but the documentation/errors returned are quite lacking.
https://graph.microsoft.com/beta/servicePrincipalshttps://graph.microsoft.com/beta/groups/{id}/members
https://graph.microsoft.com/beta/servicePrincipals https://graph.microsoft.com/beta/groups/{id}/members
我们应该使用哪个端点/api 调用来完成此操作?
Which endpoint/api call should we use to accomplish this?
推荐答案
您似乎正在尝试设置 appRoleAssignments.这目前仅在 Microsoft Graph/beta 版本上公开.正如您所发现的,/beta 文档需要一点爱和关注.然而,这几乎应该像在 AAD Graph 中那样工作(因此您可以参考 AAD Graph API 参考),但使用不同的 https://graph.microsoft.com/beta.这篇博文也有一些例子 https://blogs.msdn.microsoft.com/aadgraphteam/2014/12/12/announcing-the-new-version-of-graph-api-api-version1-5/.
It looks like you are looking to try and set appRoleAssignments. This is currently only exposed on the Microsoft Graph /beta version. The /beta documentation needs a little love and attention as you've discovered. However this pretty much should work as it does in AAD Graph (so you could reference the AAD Graph API reference), but with the different root of https://graph.microsoft.com/beta. This blog post also has some examples https://blogs.msdn.microsoft.com/aadgraphteam/2014/12/12/announcing-the-new-version-of-graph-api-api-version1-5/.
您是否面临任何具体挑战?您看到了哪些操作和错误?
Are there any specific challenges that you are facing? What operations and errors are you seeing?
希望这会有所帮助,
这篇关于Microsoft Graph - 允许用户访问应用程序/服务主体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Microsoft Graph - 允许用户访问应用程序/服务主体
基础教程推荐
- SSE 浮点算术是否可重现? 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30