Share via


Billing Role Assignments - List By Customer

Lists the role assignments for the caller on customer. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement.

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/billingRoleAssignments?api-version=2024-04-01
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/billingRoleAssignments?api-version=2024-04-01&filter={filter}&top={top}&skip={skip}

URI Parameters

Name In Required Type Description
billingAccountName
path True

string

pattern: ^([0-9]+|([Pp][Cc][Nn]\.[A-Za-z0-9]+)|[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}(:[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}_[0-9]{4}(-[0-9]{2}){2})?)$

The ID that uniquely identifies a billing account.

billingProfileName
path True

string

pattern: ^[a-zA-Z\d-_]{1,128}$

The ID that uniquely identifies a billing profile.

customerName
path True

string

pattern: ^[a-zA-Z\d-_]{1,128}$

The ID that uniquely identifies a customer.

api-version
query True

string

minLength: 1

The API version to use for this operation.

filter
query

string

The filter query option allows clients to filter a collection of resources that are addressed by a request URL.

skip
query

integer (int64)

The skip query option requests the number of items in the queried collection that are to be skipped and not included in the result.

top
query

integer (int64)

The top query option requests the number of items in the queried collection to be included in the result. The maximum supported value for top is 50.

Responses

Name Type Description
200 OK

BillingRoleAssignmentListResult

Azure operation completed successfully.

Other Status Codes

ErrorResponse

An unexpected error response.

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

BillingRoleAssignmentListByCustomer

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2018-09-30/billingProfiles/BKM6-54VH-BG7-PGB/customers/703ab484-dda2-4402-827b-a74513b61e2d/billingRoleAssignments?api-version=2024-04-01

Sample response

{
  "value": [
    {
      "name": "30000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
      "type": "Microsoft.Billing/billingAccounts/billingProfiles/customers/billingRoleAssignments",
      "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2018-09-30/billingProfiles/BKM6-54VH-BG7-PGB/customers/703ab484-dda2-4402-827b-a74513b61e2d/billingRoleAssignments/30000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
      "properties": {
        "createdByPrincipalId": "",
        "createdByPrincipalTenantId": "076915e7-de10-4323-bb34-a58c904068bb",
        "createdOn": "2023-10-19T20:10:50.1028398Z",
        "principalId": "00000000-0000-0000-0000-000000000000",
        "principalType": "User",
        "roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2018-09-30/billingProfiles/BKM6-54VH-BG7-PGB/customers/703ab484-dda2-4402-827b-a74513b61e2d/billingRoleDefinitions/30000000-aaaa-bbbb-cccc-100000000000",
        "scope": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2018-09-30/billingProfiles/BKM6-54VH-BG7-PGB/customers/703ab484-dda2-4402-827b-a74513b61e2d"
      }
    },
    {
      "name": "30000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47",
      "type": "Microsoft.Billing/billingAccounts/billingProfiles/customers/billingRoleAssignments",
      "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2018-09-30/billingProfiles/BKM6-54VH-BG7-PGB/customers/703ab484-dda2-4402-827b-a74513b61e2d/billingRoleAssignments/30000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47",
      "properties": {
        "createdByPrincipalId": "",
        "createdByPrincipalTenantId": "076915e7-de10-4323-bb34-a58c904068bb",
        "createdOn": "2023-10-19T20:10:50.1028398Z",
        "principalId": "00000000-0000-0000-0000-000000000000",
        "principalType": "User",
        "roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2018-09-30/billingProfiles/BKM6-54VH-BG7-PGB/customers/703ab484-dda2-4402-827b-a74513b61e2d/billingRoleDefinitions/30000000-aaaa-bbbb-cccc-100000000000",
        "scope": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2018-09-30/billingProfiles/BKM6-54VH-BG7-PGB/customers/703ab484-dda2-4402-827b-a74513b61e2d"
      }
    }
  ]
}

Definitions

Name Description
BillingRoleAssignment

The properties of the billing role assignment.

BillingRoleAssignmentListResult

Paged collection of BillingRoleAssignment items

BillingRoleAssignmentProperties

The properties of the billing role assignment.

createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

PrincipalType

The type of a role Assignment.

ProvisioningState

The provisioning state of the resource during a long-running operation.

systemData

Metadata pertaining to creation and last modification of the resource.

BillingRoleAssignment

The properties of the billing role assignment.

Name Type Description
id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

The name of the resource

properties

BillingRoleAssignmentProperties

The properties of the billing role assignment.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? /

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

BillingRoleAssignmentListResult

Paged collection of BillingRoleAssignment items

Name Type Description
nextLink

string (uri)

The link to the next page of items

value

BillingRoleAssignment[]

The BillingRoleAssignment items on this page

BillingRoleAssignmentProperties

The properties of the billing role assignment.

Name Type Description
billingAccountDisplayName

string

The name of the billing account.

billingAccountId

string

The fully qualified ID that uniquely identifies a billing account.

billingProfileDisplayName

string

The name of the billing profile.

billingProfileId

string

The fully qualified ID that uniquely identifies a billing profile.

billingRequestId

string

The ID of the billing request that was created for the role assignment. This is only applicable to cross tenant role assignments or role assignments created through the billing request.

createdByPrincipalId

string

The object ID of the user who created the role assignment.

createdByPrincipalPuid

string

The principal PUID of the user who created the role assignment.

createdByPrincipalTenantId

string

The tenant Id of the user who created the role assignment.

createdByUserEmailAddress

string

The email address of the user who created the role assignment. This is supported only for billing accounts with agreement type Enterprise Agreement.

createdOn

string (date-time)

The date the role assignment was created.

customerDisplayName

string

The name of the customer.

customerId

string

The fully qualified ID that uniquely identifies a customer.

invoiceSectionDisplayName

string

The name of the invoice section.

invoiceSectionId

string

The fully qualified ID that uniquely identifies an invoice section.

modifiedByPrincipalId

string

The principal PUID of the user who modified the role assignment.

modifiedByPrincipalPuid

string

The principal PUID of the user who modified the role assignment.

modifiedByPrincipalTenantId

string

The tenant Id of the user who modified the role assignment.

modifiedByUserEmailAddress

string

The email address of the user who modified the role assignment. This is supported only for billing accounts with agreement type Enterprise Agreement.

modifiedOn

string (date-time)

The date the role assignment was modified.

principalDisplayName

string

The display name of the principal to whom the role was assigned.

principalId

string

The object id of the user to whom the role was assigned.

principalPuid

string

The principal PUID of the user to whom the role was assigned.

principalTenantId

string

The principal tenant id of the user to whom the role was assigned.

principalTenantName

string

The friendly name of the tenant of the user to whom the role was assigned. This will be 'Primary Tenant' for the primary tenant of the billing account.

principalType

PrincipalType

The type of a role Assignment.

provisioningState

ProvisioningState

The provisioning state of the resource during a long-running operation.

roleDefinitionId

string

minLength: 1

The ID of the role definition.

scope

string

The scope at which the role was assigned.

userAuthenticationType

string

The authentication type of the user, whether Organization or MSA, of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.

userEmailAddress

string

The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

PrincipalType

The type of a role Assignment.

Value Description
Unknown

Unknown

None

None

User

User

Group

Group

DirectoryRole

DirectoryRole

ServicePrincipal

ServicePrincipal

Everyone

Everyone

ProvisioningState

The provisioning state of the resource during a long-running operation.

Value Description
Succeeded

Succeeded

Canceled

Canceled

Failed

Failed

New

New

Pending

Pending

Provisioning

Provisioning

PendingBilling

PendingBilling

ConfirmedBilling

ConfirmedBilling

Creating

Creating

Created

Created

Expired

Expired

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.