以编程方式分配AppRole? [英] Assigning AppRole in a programmatic way?

查看:64
本文介绍了以编程方式分配AppRole?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


嗨。 

Hi. 


我的同事试图以编程方式将AppRole分配给用户,这样我们就可以了可以允许我们的 管理员从我们的Web应用程序UI添加角色。似乎目前没有api( this
api 
仅适用于内置角色。)

My colleague is trying to assign AppRole to users in a programmatic way, so that we can allow our  admins to add role from our web application UI. It seems that currently there is no api for this (this api is just for built-in roles).


显然可以通过CloudShell实现这一点,但仍有人需要从浏览器打开云shell并执行此操作。那么无论如何以程序化的方式完成这项任务,或者我们是否需要手动完成这项工作 总是吗?

Apparently it's possible to do this via CloudShell, but still someone needs to open cloud shell from browser and do this. So is there anyway to achieve this task in a programmatic way or do we need to do it manually  always?



目前我们通过从Portal更改清单文件来手动执行此操作。

Currently we are doing this manually by changing our manifest file from Portal.

推荐答案

你可以从Azure获得Graph-RBAC Assignment Management API用于将角色分配给Azure AD用户的SDK,以及服务主体。 请参阅 GitHub示例
供参考。

You can Graph-RBAC Assignment Management API from Azure SDK to assign Roles to Azure AD User, to Service Principal.  Please refer to GitHub Sample for reference.


这篇关于以编程方式分配AppRole?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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