Skip to content

Commit 96529d5

Browse files
committed
MCM - Cloud footprint update
1 parent 2c06e31 commit 96529d5

File tree

1 file changed

+58
-2
lines changed

1 file changed

+58
-2
lines changed

articles/cost-management-billing/manage/discover-cloud-footprint.md

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Discover your Microsoft cloud footprint FAQ
33
description: This article helps to answer frequently asked questions that customers have about their Microsoft cloud footprint.
44
author: bandersmsft
55
ms.author: banders
6-
ms.date: 09/17/2024
6+
ms.date: 12/11/2024
77
ms.topic: conceptual
88
ms.service: cost-management-billing
99
ms.subservice: cost-management
@@ -103,7 +103,63 @@ Administrators can manage trials and purchases that they made, and self-service
103103

104104
## How can I get a list of subscriptions and tenants for a billing account?
105105

106-
You can view the tenants associated with a subscription in the Azure portal on the **Subscriptions** page under **Cost Management + Billing**.
106+
In the Azure portal, you can view the tenants associated with a subscription on the **Subscriptions** page under **Cost Management + Billing**.
107+
108+
Programmatically, tyou can use the publicly available API to get billing accounts that returns all associated billing subscriptions. The API also supports an optional header that returns all tenant IDs associated with the billing account. For more information, see [Billing Subscriptions - List By Billing Account](/rest/api/billing/billing-subscriptions/list-by-billing-account).
109+
110+
CLI snippet:
111+
112+
```azurecli
113+
# login
114+
az login
115+
# Get BillingAccounts
116+
az rest --method get --url https://management.azure.com/providers/Microsoft.Billing/billingAccounts?api-version=2024-04-01
117+
118+
119+
# Get BillingSubscriptions with provisioning tenant
120+
az rest --method get --url https://management.azure.com/providers/Microsoft.Billing/billingAccounts/<BillingAccountId>/billingSubscriptions?api-version=2024-04-01 --headers x-ms-service-tenant-info=true
121+
```
122+
123+
Sample call:
124+
125+
```azurecli
126+
az rest --method get --url 'https://management.azure.com/providers/Microsoft.Billing/billingAccounts/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb:bbbbbbbb-1111-2222-3333-cccccccccccc_2019-05-31/billingSubscriptions?api-version=2024-04-01' --headers x-ms-service-tenant-info=true
127+
```
128+
129+
Sample response:
130+
131+
```json
132+
{
133+
"value": [
134+
{
135+
"id": "/providers/Microsoft.Billing/billingAccounts/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb:bbbbbbbb-1111-2222-3333-cccccccccccc_2019-05-31/billingSubscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
136+
"name": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
137+
"properties": {
138+
"autoRenew": "Off",
139+
"billingFrequency": "P1M",
140+
"billingProfileDisplayName": "Contoso Partner & Field Experiences",
141+
"billingProfileId": "/providers/Microsoft.Billing/billingAccounts/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb:bbbbbbbb-1111-2222-3333-cccccccccccc_2019-05-31/billingProfiles/CustomerLedAccount_BG3",
142+
"billingProfileName": "ContosoAccount_BG3",
143+
"displayName": "Test sub for Ingestion",
144+
"invoiceSectionDisplayName": "Contoso Ingestion Publishing Service",
145+
"invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb:bbbbbbbb-1111-2222-3333-cccccccccccc_2019-05-31/billingProfiles/CustomerLedAccount_BG3/invoiceSections/AAAA-BBBB-CCC-DDD",
146+
"invoiceSectionName": "AAAA-BBBB-CCC-DDD",
147+
"operationStatus": "None",
148+
"productCategory": "UsageBased",
149+
"productType": "Usage based",
150+
"productTypeId": "DZH318Z0BPS6",
151+
"provisioningTenantId": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
152+
"purchaseDate": "2020-10-26T16:55:39.4792007Z",
153+
"quantity": 1,
154+
"skuDescription": "Microsoft Azure Plan",
155+
"skuId": "0001",
156+
"status": "Active",
157+
"subscriptionId": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e"
158+
},
159+
"type": "Microsoft.Billing/billingAccounts/billingSubscriptions"
160+
}
161+
}
162+
```
107163

108164
## How can I view the Azure tenant that I am currently signed in to?
109165

0 commit comments

Comments
 (0)