How to determine which API Permissions are necessary to run a particular Azure PowerShell command?
我有一个用于自动化的服务主体。它在我们的 Azure Active Directory 的 Microsoft Graph 中具有 
它不能运行 
| 1 2 3 | Cannot find the Azure Active Directory object 'My-AD-Group'. Please make sure that the user or group you are authorizing is registered in the current subscription's Azure Active directory. | 
如果我运行与我自己相同的命令,它运行得很好。
显然,我的服务主体需要的不仅仅是 
有谁知道我如何确切地发现运行涉及访问 Azure Active Directory 的特定 Azure PowerShell 命令需要哪些 API 权限?
顺便说一句,我不依赖于 PowerShell。我也无法让此命令与 
您需要授予 Azure AD Graph API 而不是 Microsoft Graph API 的 
如果要将服务主体添加为订阅或 sql server 的角色,请导航到门户中的订阅或 sql server -> 

| 1 | Set-AzSqlServerActiveDirectoryAdministrator -ResourceGroupName"<ResourceGroupName>" -ServerName"<ServerName>" -DisplayName"group1" -ObjectId"64d1b8xxxxx4ffbd" | 

Does anyone know how I can discover exactly what API permissions would be required to run a particular Azure PowerShell command that involves accessing Azure Active Directory?
Azure PowerShell 本质上调用了不同的 API,要获取 API 的权限,您可以通过 Fiddler 捕获请求,然后查看官方 API 文档以获取权限。