Microsoft Graph - 允许用户访问应用程序/服务主体 [英] Microsoft Graph - Allow User Access to Application / Service Principal

查看:27
本文介绍了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 - 允许用户访问应用程序/服务主体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆