Billing Profiles - List By Billing Account

Lists the billing profiles that a user has access to. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles?api-version=2020-05-01
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles?api-version=2020-05-01&$expand={$expand}

URI Parameters

Name In Required Type Description
billingAccountName
path True

string

The ID that uniquely identifies a billing account.

api-version
query True

string

The version of the API to be used with the client request. The current version is 2020-05-01.

$expand
query

string

May be used to expand the invoice sections.

Responses

Name Type Description
200 OK

BillingProfileListResult

OK. The request has succeeded.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

BillingProfilesListByBillingAccount
BillingProfilesListWithExpand

BillingProfilesListByBillingAccount

Sample Request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles?api-version=2020-05-01

Sample Response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000",
      "name": "11000000-0000-0000-0000-000000000000",
      "type": "Microsoft.Billing/billingAccounts/billingProfiles",
      "properties": {
        "displayName": "BillingProfile1",
        "billingRelationshipType": "Direct",
        "billTo": {
          "companyName": "Contoso",
          "firstName": "Test",
          "lastName": "User",
          "addressLine1": "Test Address1",
          "addressLine2": "Test Address2",
          "addressLine3": "Test Address3",
          "city": "City",
          "postalCode": "00000",
          "region": "WA",
          "country": "US",
          "email": "abc@contoso.com",
          "phoneNumber": "000-000-0000"
        },
        "currency": "USD",
        "enabledAzurePlans": [
          {
            "skuId": "0001",
            "skuDescription": "Microsoft Azure Plan"
          },
          {
            "skuId": "0002",
            "skuDescription": "Microsoft Azure Plan for DevTest"
          }
        ],
        "invoiceDay": 5,
        "invoiceEmailOptIn": true,
        "poNumber": "ABC12345",
        "hasReadAccess": true,
        "systemId": "1XXX-11XX-XX1-XXXX-XXX",
        "status": "Warned",
        "statusReasonCode": "PastDue",
        "spendingLimit": "On"
      }
    },
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000001",
      "name": "11000000-0000-0000-0000-000000000001",
      "type": "Microsoft.Billing/billingAccounts/billingProfiles",
      "properties": {
        "displayName": "BillingProfile2",
        "billingRelationshipType": "IndirectCustomer",
        "billTo": {
          "companyName": "Contoso",
          "firstName": "Test",
          "lastName": "User",
          "addressLine1": "Test Address1",
          "addressLine2": "Test Address2",
          "addressLine3": "Test Address3",
          "city": "City",
          "postalCode": "00000",
          "region": "WA",
          "country": "US",
          "email": "abc@contoso.com",
          "phoneNumber": "000-000-0000"
        },
        "currency": "USD",
        "enabledAzurePlans": [
          {
            "skuId": "0001",
            "skuDescription": "Microsoft Azure Plan"
          },
          {
            "skuId": "0002",
            "skuDescription": "Microsoft Azure Plan for DevTest"
          }
        ],
        "indirectRelationshipInfo": {
          "billingAccountName": "30000000-0000-0000-0000-000000000001_00000000-0000-0000-0000-000000000000",
          "billingProfileName": "33000000-0000-0000-0000-000000000001",
          "displayName": "Partner1"
        },
        "invoiceDay": 5,
        "invoiceEmailOptIn": true,
        "poNumber": "ABC12345",
        "hasReadAccess": true,
        "systemId": "2XXX-22XX-XX1-XXXX-XXX",
        "status": "Active",
        "spendingLimit": "Off",
        "targetClouds": []
      }
    }
  ]
}

BillingProfilesListWithExpand

Sample Request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles?api-version=2020-05-01&$expand=invoiceSections

Sample Response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000",
      "name": "11000000-0000-0000-0000-000000000000",
      "type": "Microsoft.Billing/billingAccounts/billingProfiles",
      "properties": {
        "displayName": "BillingProfile1",
        "billingRelationshipType": "Direct",
        "billTo": {
          "companyName": "Contoso",
          "firstName": "Test",
          "lastName": "User",
          "addressLine1": "Test Address1",
          "addressLine2": "Test Address2",
          "addressLine3": "Test Address3",
          "city": "City",
          "postalCode": "00000",
          "region": "WA",
          "country": "US",
          "email": "abc@contoso.com",
          "phoneNumber": "000-000-0000"
        },
        "currency": "USD",
        "enabledAzurePlans": [
          {
            "skuId": "0001",
            "skuDescription": "Microsoft Azure Plan"
          },
          {
            "skuId": "0002",
            "skuDescription": "Microsoft Azure Plan for DevTest"
          }
        ],
        "invoiceDay": 5,
        "invoiceEmailOptIn": true,
        "poNumber": "ABC12345",
        "hasReadAccess": true,
        "systemId": "1XXX-11XX-XX1-XXXX-XXX",
        "status": "Warned",
        "statusReasonCode": "PastDue",
        "spendingLimit": "On",
        "targetClouds": [],
        "invoiceSections": {
          "hasMoreResults": false,
          "value": [
            {
              "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/invoiceSectionId1",
              "name": "invoiceSectionId1",
              "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections",
              "properties": {
                "displayName": "invoiceSectionName1",
                "labels": {
                  "pcCode": "A123456",
                  "costCategory": "Support"
                },
                "state": "Active",
                "systemId": "9XXX-11XX-XX1-XXXX-XXX"
              }
            }
          ]
        }
      }
    },
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000001",
      "name": "11000000-0000-0000-0000-000000000001",
      "type": "Microsoft.Billing/billingAccounts/billingProfiles",
      "properties": {
        "displayName": "BillingProfile2",
        "billingRelationshipType": "IndirectCustomer",
        "billTo": {
          "companyName": "Contoso",
          "firstName": "Test",
          "lastName": "User",
          "addressLine1": "Test Address1",
          "addressLine2": "Test Address2",
          "addressLine3": "Test Address3",
          "city": "City",
          "postalCode": "00000",
          "region": "WA",
          "country": "US",
          "email": "abc@contoso.com",
          "phoneNumber": "000-000-0000"
        },
        "currency": "USD",
        "enabledAzurePlans": [
          {
            "skuId": "0001",
            "skuDescription": "Microsoft Azure Plan"
          },
          {
            "skuId": "0002",
            "skuDescription": "Microsoft Azure Plan for DevTest"
          }
        ],
        "indirectRelationshipInfo": {
          "billingAccountName": "30000000-0000-0000-0000-000000000001_00000000-0000-0000-0000-000000000000",
          "billingProfileName": "33000000-0000-0000-0000-000000000001",
          "displayName": "Partner1"
        },
        "invoiceDay": 5,
        "invoiceEmailOptIn": true,
        "poNumber": "ABC12345",
        "hasReadAccess": true,
        "systemId": "2XXX-22XX-XX1-XXXX-XXX",
        "status": "Warned",
        "statusReasonCode": "PastDue",
        "spendingLimit": "On",
        "targetClouds": [],
        "invoiceSections": {
          "hasMoreResults": false,
          "value": [
            {
              "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000001/invoiceSections/invoiceSectionId2",
              "name": "invoiceSectionId2",
              "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections",
              "properties": {
                "displayName": "invoiceSectionName2",
                "labels": {
                  "pcCode": "Z223456",
                  "costCategory": "Marketing"
                },
                "state": "Active",
                "systemId": "9XXX-22XX-XX1-XXXX-XXX"
              }
            }
          ]
        }
      }
    }
  ]
}

Definitions

Name Description
AddressDetails

Address details.

AzurePlan

Details of the Azure plan.

BillingProfile

A billing profile.

BillingProfileListResult

The list of billing profiles.

BillingProfileStatus

The status of the billing profile.

BillingRelationshipType

Identifies which services and purchases are paid by a billing profile.

ErrorDetails

The details of the error.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

ErrorSubDetails
IndirectRelationshipInfo

The billing profile details of the partner of the customer for an indirect motion.

InvoiceSection

An invoice section.

InvoiceSectionsOnExpand

The invoice sections associated to the billing profile. By default this is not populated, unless it's specified in $expand.

InvoiceSectionState

Identifies the state of an invoice section.

SpendingLimit

The billing profile spending limit.

StatusReasonCode

Reason for the specified billing profile status.

targetCloud

Identifies the cloud environments that are associated with an invoice section. This is a system managed optional field and gets updated as the invoice section gets associated with accounts in various clouds.

AddressDetails

Address details.

Name Type Description
addressLine1

string

Address line 1.

addressLine2

string

Address line 2.

addressLine3

string

Address line 3.

city

string

Address city.

companyName

string

Company name.

country

string

Country code uses ISO2, 2-digit format.

district

string

Address district.

email

string

Email address.

firstName

string

First name.

lastName

string

Last name.

middleName

string

Middle name.

phoneNumber

string

Phone number.

postalCode

string

Postal code.

region

string

Address region.

AzurePlan

Details of the Azure plan.

Name Type Description
skuDescription

string

The sku description.

skuId

string

The sku id.

BillingProfile

A billing profile.

Name Type Description
id

string

Resource Id.

name

string

Resource name.

properties.billTo

AddressDetails

Billing address.

properties.billingRelationshipType

BillingRelationshipType

Identifies which services and purchases are paid by a billing profile.

properties.currency

string

The currency in which the charges for the billing profile are billed.

properties.displayName

string

The name of the billing profile.

properties.enabledAzurePlans

AzurePlan[]

Information about the enabled azure plans.

properties.hasReadAccess

boolean

Indicates whether user has read access to the billing profile.

properties.indirectRelationshipInfo

IndirectRelationshipInfo

Identifies the billing profile that is linked to another billing profile in indirect purchase motion.

properties.invoiceDay

integer

The day of the month when the invoice for the billing profile is generated.

properties.invoiceEmailOptIn

boolean

Flag controlling whether the invoices for the billing profile are sent through email.

properties.invoiceSections

InvoiceSectionsOnExpand

The invoice sections associated to the billing profile. By default this is not populated, unless it's specified in $expand.

properties.poNumber

string

The purchase order name that will appear on the invoices generated for the billing profile.

properties.spendingLimit

SpendingLimit

The billing profile spending limit.

properties.status

BillingProfileStatus

The status of the billing profile.

properties.statusReasonCode

StatusReasonCode

Reason for the specified billing profile status.

properties.systemId

string

The system generated unique identifier for a billing profile.

properties.tags

object

Tags of billing profiles.

properties.targetClouds

targetCloud[]

Identifies the cloud environments that are associated with a billing profile. This is a system managed optional field and gets updated as the billing profile gets associated with accounts in various clouds.

type

string

Resource type.

BillingProfileListResult

The list of billing profiles.

Name Type Description
nextLink

string

The link (url) to the next page of results.

totalCount

number

Total number of records.

value

BillingProfile[]

The list of billing profiles.

BillingProfileStatus

The status of the billing profile.

Name Type Description
Active

string

Disabled

string

Warned

string

BillingRelationshipType

Identifies which services and purchases are paid by a billing profile.

Name Type Description
CSPPartner

string

Direct

string

IndirectCustomer

string

IndirectPartner

string

ErrorDetails

The details of the error.

Name Type Description
code

string

Error code.

details

ErrorSubDetails[]

The sub details of the error.

message

string

Error message indicating why the operation failed.

target

string

The target of the particular error.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Name Type Description
error

ErrorDetails

The details of the error.

ErrorSubDetails

Name Type Description
code

string

Error code.

message

string

Error message indicating why the operation failed.

target

string

The target of the particular error.

IndirectRelationshipInfo

The billing profile details of the partner of the customer for an indirect motion.

Name Type Description
billingAccountName

string

The billing account name of the partner or the customer for an indirect motion.

billingProfileName

string

The billing profile name of the partner or the customer for an indirect motion.

displayName

string

The display name of the partner or customer for an indirect motion.

InvoiceSection

An invoice section.

Name Type Description
id

string

Resource Id.

name

string

Resource name.

properties.displayName

string

The name of the invoice section.

properties.labels

object

Dictionary of metadata associated with the invoice section.

properties.state

InvoiceSectionState

Identifies the state of an invoice section.

properties.systemId

string

The system generated unique identifier for an invoice section.

properties.tags

object

Dictionary of metadata associated with the invoice section. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? /

properties.targetCloud

targetCloud

Identifies the cloud environments that are associated with an invoice section. This is a system managed optional field and gets updated as the invoice section gets associated with accounts in various clouds.

type

string

Resource type.

InvoiceSectionsOnExpand

The invoice sections associated to the billing profile. By default this is not populated, unless it's specified in $expand.

Name Type Description
hasMoreResults

boolean

Indicates whether there are more invoice sections than the ones listed in this collection. The collection lists a maximum of 50 invoice sections. To get all invoice sections, use the list invoice sections API.

value

InvoiceSection[]

The invoice sections associated to the billing profile.

InvoiceSectionState

Identifies the state of an invoice section.

Name Type Description
Active

string

Restricted

string

SpendingLimit

The billing profile spending limit.

Name Type Description
Off

string

On

string

StatusReasonCode

Reason for the specified billing profile status.

Name Type Description
PastDue

string

SpendingLimitExpired

string

SpendingLimitReached

string

targetCloud

Identifies the cloud environments that are associated with an invoice section. This is a system managed optional field and gets updated as the invoice section gets associated with accounts in various clouds.

Name Type Description
USGov

string

USNat

string

USSec

string