azure - 为什么在 Azure 中通过 "try it"发出发票 - 按账单订阅列出的请求会给出 404?

标签 azure billing

预先感谢:)我使用这些参数执行了此请求( https://learn.microsoft.com/en-us/rest/api/billing/2019-10-01-preview/invoices/list-by-billing-subscription#code-try-0 ),并得到答复 404。任何人都可以告诉我我做错了什么吗?我正在与作为此个人帐户所有者的用户一起执行此操作。此外,我们在企业帐户中执行此操作,因为我们知道此信息并非适用于每个订阅。我们对具有计费读取器权限的用户执行了此操作,但也给出了 404。

  • billingAccountName:在“成本管理 + 计费”>“属性”中查找
  • billingSubscriptionName:订阅名称的 ID
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/invoices?api-version=2019-10-01-preview&periodEndDate=2022-06-01&periodStartDate=2022-06-30
cache-control: no-cache
content-length: 0
date: Fri, 24 Jun 2022 09:31:35 GMT
expires: -1
mise-correlation-id: de3c5cae-0644-43c1-9941-dd675e595f2a
pragma: no-cache
x-frame-options: DENY
x-ms-correlation-request-id: b4d8cb29-13e9-4795-b17b-8d0eafea4d3e
x-ms-ratelimit-remaining-tenant-reads: 11994
x-ms-request-id: b4d8cb29-13e9-4795-b17b-8d0eafea4d3e
x-ms-routing-request-id: FRANCECENTRAL:20220624T093135Z:b4d8cb29-13e9-4795-b17b-8d0eafea4d3e
x-ms-service-version: 10.6.1992.510

最佳答案

Why the request of Invoices - List By Billing Subscription in Azure through the "try it" gives a 404?

  • 如果您使用免费的 Azure 成员(member)资格,则无法查看发票详细信息。
  • 发票仅适用于结算帐户、结算资料和即用即付订阅。
  • 在 Azure Active Directory 中,检查您的角色

导航到 Azure 门户 => Azure Active Directory => 角色和管理员

enter image description here

  • 了解角色

导航到 Azure 门户 => 您的资源组 => 访问控制 (IAM)

enter image description here

  • 检查您是否可以授予对发票的访问权限

  • 为了使 API 能够访问发票数据,我们必须通过 Azure 门户授予它们权限。 导航到 Azure 门户 => 成本管理 + 计费 => 您的订阅 => 发票 => 访问发票 => 选择打开 => 保存

enter image description here

enter image description here

enter image description here

  • 我拥有贡献者角色,当我尝试访问发票时收到以下消息

enter image description here

关于azure - 为什么在 Azure 中通过 "try it"发出发票 - 按账单订阅列出的请求会给出 404?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72741082/

相关文章:

c# - 存储要在 Azure 角色之间共享的静态文件

Azure Powershell - AzureAdUser V AzAdUser

php - 我可以向 Stripe 收取可变金额的订阅费吗?

已过期 MSDN 订阅的 Azure 积分仍然有效

azure - Windows Azure。 worker 角色计费

azure - 如何使用 Terraform 的文件配置程序从本地计算机复制到虚拟机?

azure - 使用 Azure 文本转语音 SSML 更改句子中的单词强调

c# - 从辅助角色使用 Azure Cmdlet

Android 订阅 getPurchases

sql-server - 如何通过计费 API 查找 Azure 使用记录中的唯一性