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.

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

报告相同问题?

悬赏问题

  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?