简体   繁体   English

Azure 成本管理 API - 想要连接 Usage API?

[英]Azure Cost Management API - Looking to Connect the Usage API?

So I'm using Power Automate to connect the API for Azure Cost Management Usage Specifically this guy:所以我正在使用 Power Automate 连接 API 以进行 Azure 成本管理使用 特别是这个人:

https://docs.microsoft.com/en-us/rest/api/consumption/usage-details/list?tabs=HTTP https://docs.microsoft.com/en-us/rest/api/consumption/usage-details/list?tabs=HTTP

However, Powerautoamte, though it has an ADAuth with Oauth2 option, requires something called an "Audience?"然而,Powerautoamte,虽然它有一个带有 Oauth2 选项的 ADAuth,但需要一个叫做“Audience?”的东西。 and really I have no idea what to put here.我真的不知道该放什么。

I have indeed registered an app, gave it the user-impresonation permission, approved it for my domain, and generated a client/secret for that app.我确实注册了一个应用程序,授予它用户模拟权限,为我的域批准了它,并为该应用程序生成了一个客户端/秘密。 All I need is the "Audience"我需要的只是“观众”

在此处输入图像描述

The Audience is the API which your AAD app has permissions on. Audience是您的 AAD 应用程序有权访问的 API。

To find this URL, try to navigate to Azure AD and App Registration , then select your Application, and click on API Permissions .要查找此 URL,请尝试导航到Azure ADApp Registration ,然后选择您的应用程序,然后单击API Permissions

Select API / Permissions name which should popup the permission details along with the used API.选择 API / 权限名称,该名称应与使用的 API 一起弹出权限详细信息。

For example my AAD app has Microsoft Graph permissions例如,我的 AAD 应用具有 Microsoft Graph 权限

在此处输入图像描述

If I select Microsoft Graph row or click on one of the permissions the popup shows details如果我选择Microsoft Graph行或单击其中一项权限,弹出窗口会显示详细信息

在此处输入图像描述

在此处输入图像描述

The URL https://graph.microsoft.com/ represents the Audience in my case. URL https://graph.microsoft.com/代表我的受众。

You are probably using Azure Service Management, so in your case the Audience will be https://management.azure.com/您可能正在使用 Azure 服务管理,因此在您的情况下,受众将是https://management.azure.com/

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM