Getting "Authentication failed" error with code 105 when trying to access GetAccountsInfo API

Andrey 0 Reputation points
2023-03-17T11:13:41.37+00:00

Hello,

I'm trying to access GetAccountsInfo API and sending Request SOAP like in this doc:

https://zcusa.951200.xyz/en-us/advertising/customer-management-service/getaccountsinfo?view=bingads-13#request-soap

This is the SOAP i'm sending:

<s:Envelope
	xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
	<s:Header
		xmlns="https://bingads.microsoft.com/Customer/v13">
		<Action mustUnderstand="1">GetAccountsInfo</Action>
		<AuthenticationToken i:nil="false">M.R3_BAY.****0</AuthenticationToken>
		<DeveloperToken i:nil="false">129****91</DeveloperToken>
	</s:Header>
	<s:Body>
		<GetAccountsInfoRequest
			xmlns="https://bingads.microsoft.com/Customer/v13">
			<CustomerId i:nil="false">f3****e</CustomerId>
		</GetAccountsInfoRequest>
	</s:Body>
</s:Envelope>

This is what I'm getting back:

<s:Envelope
	xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
	<s:Body>
		<s:Fault>
			<faultcode>s:Server</faultcode>
			<faultstring>Invalid client data. Check the SOAP fault details for more information. TrackingId: 375389be-2131-44aa-af39-eb9f6b07622b.</faultstring>
			<detail>
				<AdApiFaultDetail
					xmlns="https://adapi.microsoft.com"
					xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
					<TrackingId>375389be-2131-44aa-af39-eb9f6b07622b</TrackingId>
					<Errors>
						<AdApiError>
							<Code>105</Code>
							<Detail i:nil="true"/>
							<ErrorCode>InvalidCredentials</ErrorCode>
							<Message>Authentication failed. Either supplied credentials are invalid or the account is inactive</Message>
						</AdApiError>
					</Errors>
				</AdApiFaultDetail>
			</detail>
		</s:Fault>
	</s:Body>
</s:Envelope>

My account is active, I'm using production environment and my developer token is of "universal" type which should allow for multi-user / programmatic access.

Additionally I'm adding msads.manage in scope when requesting AuthenticationToken for above SOAP.

Could somebody please help me to understand why this is happening and how to address this?

Thanks,

Andrey

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.
434 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andrey 0 Reputation points
    2023-03-17T15:42:49.0366667+00:00

    It was a misunderstanding on my end. This question can be closed now.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.