azure - 如何使用 Azure Powershell 检索应用系统分配的标识对象 ID
问题描述
我正在使用 Azure Powershell 3.8.0
我正在尝试获取可以在此屏幕中看到的对象 ID:
我尝试使用以下内容:
PS> (Get-AzResource -Name "func-example").Identity.PrincipalId
但它与对象 ID 不匹配。
然后还有:
PS> (Get-AzWebApp -Name "func-example" -ResourceGroupName RGNAME).Identity
但也不匹配
有谁知道如何使用 Azure Powershell 获取该 ID?
解决方案
你可以这样做,
使用 PowerShell:
Get-AzADServicePrincipal -DisplayName 'func-example'
使用 CLI:
az ad sp list --display-name 'func-example'
推荐阅读
- c - fscanf 只读取一些字符
- typescript - 具有 TypeORM 存储库的通用类型
- bash - 如何在 bash/sed 中替换采用 shell 变量形式的字符串文字?
- javascript - 我收到错误列表中的每个孩子都应该有一个唯一的“关键”道具
- c# - .net 核心 5.0。在控制器中实例化类时:没有给出与所需形式参数“配置”相对应的参数
- activemq-artemis - Artemis 使用 AMQ222010 关闭:严重 IO 错误,正在关闭服务器 [要求澄清]
- c# - 在 .NET/C# 世界中,由于语言、框架、库的限制,您是否需要(过度)使用接口?(来自 Java 开发人员的问题)
- r - 如何在 R 中使用 Galton-Watson 过程找到灭绝概率 = 1?
- snoopy - 使用 snoopy 在 php 中自动登录
- linux - Raspberry PI - 隐藏 hostapd 接入点,使其不会出现在 wifi 扫描列表中