CustomerRole Data Object - Customer Management

Defines account access rights for a person who acts on behalf of a specific customer.

A person can use the same login credentials to access accounts across multiple customers, and multiple CustomerRole objects can be returned for one person via the GetUser operation. For example, two CustomerRole objects are returned if user@contoso.com was invited to Customer 123 and the user also has access to manage linked accounts under Customer 234.

Taken individually, a user has the same role on the CustomerId, AccountIds, and LinkedAccountIds for a given CustomerRole; however, if a user has multiple customer roles then taken as a whole the effective permissions depend on the full set of CustomerRoles returned by GetUser. Several examples are provided below.

Tip

Please see the Account Hierchy and User Permissions guide for an overview of customer roles with examples.

Syntax

<xs:complexType name="CustomerRole" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:sequence>
    <xs:element minOccurs="0" name="RoleId" type="xs:int" />
    <xs:element minOccurs="0" name="CustomerId" type="xs:long" />
    <xs:element xmlns:q7="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="AccountIds" nillable="true" type="q7:ArrayOflong" />
    <xs:element xmlns:q8="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="LinkedAccountIds" nillable="true" type="q8:ArrayOflong" />
    <xs:element minOccurs="0" name="CustomerLinkPermission" nillable="true" type="xs:string" />
  </xs:sequence>
</xs:complexType>

Elements

The CustomerRole object has the following elements: AccountIds, CustomerId, CustomerLinkPermission, LinkedAccountIds, RoleId.

Element Description Data Type
AccountIds The list of accounts that the user can access in the customer.

If the user has CID level of access, then AccountIDs will be not returned. For account level access, the AccountIDs will be returned in the CustomerRole object of the GetUser API.
long array
CustomerId The identifier of the customer where the user has either signed up or has some account hierarchy relationship. long
CustomerLinkPermission Determines whether the user's access to the accounts is restricted by customer hierarchy i.e., customer level client linking.

The possible values include Administrative, Standard, and LinkedEntityOnly. It is also possible this field can be nil or empty.

If this field is nil or empty, the user is signed up directly on the CustomerId.

If this field is set to "Administrative", the user has access to the CustomerId through an Administrative customer link.

If this field is set to "Standard", the user has access to the CustomerId through a Standard customer link.

If this field is set to "LinkedEntityOnly", the user is signed up directly on the CustomerId but cannot access its advertiser accounts. The CustomerId is part of a customer link hierarchy whereby the user can access other customers below it.

For more information, see the User Roles technical guide.
string
LinkedAccountIds The list of linked accounts that the user can access through the CustomerId as an agency on behalf of another customer.

If this element is nil, the user does not have access to individually linked advertiser accounts through the CustomerId. The user might have access to advertiser accounts in other linked customers, so be sure to take into account all CustomerRoles returned by GetUser.

Please note that accounts created as an aggregator via SignupCustomer will also be returned in this element. You can delete aggregatee accounts via DeleteAccount, but you cannot delink them via UpdateClientLinks. Call the SearchClientLinks operation to help determine which accounts can be delinked.
long array
RoleId The role that the user has when accessing advertiser accounts through the CustomerId.

Possible values include the following:
16 - The user has the Advertiser Campaign Manager role.
33 - The user has the Aggregator role.
41 - The user has the Super Admin role.
100 - The user has the Viewer role.
203 - The user has the Standard User role.

For more information, see the User Roles technical guide.
int

Requirements

Service: CustomerManagementService.svc v13
Namespace: https://bingads.microsoft.com/Customer/v13/Entities

Used By

GetUser