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 - 允许用户访问应用程序/服务主体
基础教程推荐
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- WPF 模态进度窗口 2022-01-01
