Bing Ads API v13 CustomerManagementService.SignupCustomerAsync: The user is not authorized to perform this action.

Kunze Medien 1 Reputation point
2022-01-11T13:38:43.417+00:00

Hi,

I'm using the .NET SDK to create new customers and accounts under a manager account. I'm using a super admin user to access the manager account and I can authenticate with the API successfully and retrieve access and refresh tokens without a problem. Yet when I call the SignupCustomerAsync method located in the ICustomerManagementService interface, I get the following error "The user is not authorized to perform this action.", with the code 1001. Here's a code sample.

var authorizationData = await Authenticator.AuthenticateWithPublisherOAuth(CredentialsFactory.Credentials);
var serviceClient = new ServiceClient<ICustomerManagementService>(authorizationData);
var response = await serviceClient.CallAsync(async (service, request) => await service.SignupCustomerAsync(request), 
                    new SignupCustomerRequest 
                    { 
                        ParentCustomerId = <Id of the manager account>,
                        Customer = new Customer()
                        {
                            Name = "",
                            CustomerAddress = new Address()
                            {
                                City = "",
                                CountryCode = "",
                                Line1 = "",
                                PostalCode = ""
                            },
                            Industry = Industry.Other,
                            MarketLanguage = LanguageType.SomeLanguage,
                            MarketCountry = ""
                        },
                        Account = new AdvertiserAccount()
                        {
                            Name = "",
                            CurrencyCode = CurrencyCode.SomeCurrency,
                            ParentCustomerId = <Id of the manager account>,
                            TimeZone = TimeZoneType.SomeTimeZone

                        }
                    });

The AuthorizationData object has its Authentication and DeveloperToken fields set. The CustomerId and AccountId fields have been left empty as they are ignored by the service, according to the API docs. (I tried setting these values as well, to no avail) I don't understand why I'm getting this error as the email account I'm using to access the Bing Ads manager account has the Super Admin role. Any help is appreciated.

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
386 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Qingjun Tian 6 Reputation points Microsoft Employee
    2022-01-12T07:17:26.54+00:00

    do you have the trackingid which could be found from the response?