dsfgds4215 2019-06-11 20:56
浏览 531
已采纳

如何从应用程序(客户端)ID和目录(租户)ID获取对象ID?

Using the azure go sdk, is it possible to use the Application (client) ID, Directory (tenant) ID, and a valid Client secret to obtain the Object ID of the Azure Active Directory application? How?

Here is a screenshot of the Azure portal to help clarify those three fields.

enter image description here

I've tried to use the following function from graphrbac, but the *result.Value does not match with the Object ID from the screenshot above.

func (client ApplicationsClient) GetServicePrincipalsIDByAppID(ctx context.Context, applicationID string) (result ServicePrincipalObjectResult, err error)

  • 写回答

1条回答 默认 最新

  • drju37335 2019-06-12 05:51
    关注

    The function in your question is to get the id of the service principal(located in the Enterprise applications in the portal), not the azure ad application(located in the App registrations) which in your screenshot.

    It seems there is no such function to get the objectid of the application via the properties that you want to use. (I am not familiar with go, if there is something wrong, please correct me.) The most similar is func (ApplicationsClient) Get which need the objectid, or the func (ApplicationsClient) List to list applications.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 java在应用程序里获取不到扬声器设备
  • ¥15 echarts动画效果的问题,请帮我添加一个动画。不要机器人回答。
  • ¥60 许可证msc licensing软件报错显示已有相同版本软件,但是下一步显示无法读取日志目录。
  • ¥15 Attention is all you need 的代码运行
  • ¥15 一个服务器已经有一个系统了如果用usb再装一个系统,原来的系统会被覆盖掉吗
  • ¥15 使用esm_msa1_t12_100M_UR50S蛋白质语言模型进行零样本预测时,终端显示出了sequence handled的进度条,但是并不出结果就自动终止回到命令提示行了是怎么回事:
  • ¥15 前置放大电路与功率放大电路相连放大倍数出现问题
  • ¥80 部署运行web自动化项目
  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系
  • ¥30 VMware 云桌面水印如何添加