Sandbox API Authentication Error — Code 105 (InvalidCredentials)

santosh sakre 0 Reputation points
2025-11-12T04:54:29.1566667+00:00

Hello Microsoft Advertising Support Team,

I’m currently testing Microsoft Advertising API integration in the sandbox environment, and I’m consistently encountering the following error when calling the GetUser operation:

{   "details": {     "details": "{"Errors":[{"Code":105,"Message":"Authentication failed. Either supplied credentials are invalid or the account is inactive","Detail":null,"ErrorCode":"InvalidCredentials"}],"TrackingId":"7ccf4394-18df-4a35-9366-b5a4d9a22022","Type":"AdApiFaultDetail"}",     "error": true   },   "error": "Failed to fetch sandbox user info" }

I’ve followed the official sandbox setup documentation and successfully obtained an OAuth access token through the Microsoft identity platform. However, when I use this token with the sandbox REST endpoint, the API responds with the InvalidCredentials fault.

Could you please help verify:

Whether this issue is related to sandbox account linking or developer token configuration.

If there are any known issues with authentication for sandbox users at this time.

Any specific steps needed to ensure sandbox users and tokens are properly associated with sandbox customers.

Thank you for your assistance.
Best regards,
Santosh Sakre

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

1 answer

Sort by: Most helpful
  1. MS Advertising - Vahid 110 Reputation points Microsoft External Staff Moderator
    2025-11-12T08:41:43.7966667+00:00

    Hello Santosh,

    I understand that you’re running into authentication challenges with the Microsoft Advertising API sandbox when calling the GetUser operation. I’m here to help you work through this error and point you toward the right resources so you can get your integration running smoothly. Additionally, I'll be more than happy to relay your details to our API experts for providing you with a more concrete response when necessary. You can also respond to me privately if you want to discuss things further.

    The Sandbox API Authentication Error with Code 105 indicates that there are invalid credentials being used. This typically means that the access token or developer token provided is incorrect for the target environment. For instance, your credentials might be valid in the production environment but not in the sandbox environment, leading to this error. To resolve this, ensure that you are using the correct tokens for the sandbox environment and that your account is active. If you continue to experience issues, you may need to re-authenticate or check your account settings. Please see the following resources for further details:

    Handling Service Errors and Exceptions

    Operation Error Codes
    Sandbox Quick Start

    To verify whether the issue is related to sandbox account linking or developer token configuration, you should first ensure that you have signed up for a Microsoft Advertising sandbox account. The Microsoft account used must be an Outlook.com email. Additionally, confirm that you are using the correct developer token associated with your sandbox account. If the tokens are valid but you still face issues, it may indicate a problem with account linking.

    Currently, the page content does not mention any known issues with authentication for sandbox users. However, it is essential to ensure that you are following the correct steps for authentication in the sandbox environment. This includes using the same client ID as production and ensuring that the access and refresh tokens are obtained correctly. If you encounter errors, re-check your tokens and account settings.

    Our support teams are also happy to discuss your account in more detail via phone, chat or email to provide review assistance, please see our support page to reach out! 

    I hope the information provided here will at least partly answer your question.  If you have any additional questions please do not hesitate to reach out to our support. I have also sent you a private message asking for further details. You are more than welcome to respond to me to that I can begin the investigation on my end.

     

    Kind regards, 

    Vahid | Microsoft Advertising Support Specialist | 800-518-5689

    0 comments No comments

Your answer

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