Refresh token in Microsoft Ads sandbox

Esther Brodt 11 Reputation points
2025-09-08T08:26:37.86+00:00

Hi,

We have a Bing sandbox account and we have been using https://login.windows-ppe.net to refresh the token until now.

This URL no longer works. The recommended URL to use (https://login.microsoftonline.com) doesn't recognize the username we use to log into the sandbox, nor does it recognize the client_id of the sandbox account.

I'm posting this message as the user associated to our live account.

Please advise how to refresh the token to the sandbox.

Thanks

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

5 answers

Sort by: Most helpful
  1. MS Advertising - Vahid 110 Reputation points Microsoft External Staff Moderator
    2025-09-08T11:20:12.4366667+00:00

    Hi Esther,

    Thank you for getting back to me. According to the API documentation, you can proceed based on the below steps.

    To get an Outlook email address, you can follow these steps:

    1. Create a Microsoft Account (MSA): Go to the Microsoft account sign-up page and select Create an account. You will need to choose the option to Get a new email address.
    2. Choose an Outlook Domain: When prompted, enter a desired email address that ends with @outlook.com. This is necessary because the sandbox environment only supports Microsoft accounts created using an Outlook.com email address.
    3. Complete the Sign-Up Process: Fill in the required information to complete the account creation process.

    Once you have created your Outlook email address, you will need to connect it to your existing sandbox account. You can do this by inviting the new Outlook email address to your sandbox account:

    1. In the Microsoft Advertising sandbox, go to Settings.
    2. Select User management.
    3. Choose Invite user and enter your new Outlook email address.
    4. Follow the prompts to send the invitation.

    After the user accepts the invitation, they will be able to access the sandbox using the new Outlook email address. To get an Outlook email address, you can follow these steps:

    1. Create a Microsoft Account (MSA): Go to the Microsoft account sign-up page and select Create an account. You will need to choose the option to Get a new email address.
    2. Choose an Outlook Domain: When prompted, enter a desired email address that ends with @outlook.com. This is necessary because the sandbox environment only supports Microsoft accounts created using an Outlook.com email address.
    3. Complete the Sign-Up Process: Fill in the required information to complete the account creation process.

    Once you have created your Outlook email address, you will need to connect it to your existing sandbox account. You can do this by inviting the new Outlook email address to your sandbox account:

    1. In the Microsoft Advertising sandbox, go to Settings.
    2. Select User management.
    3. Choose Invite user and enter your new Outlook email address.
    4. Follow the prompts to send the invitation.

    After the user accepts the invitation, they will be able to access the sandbox using the new Outlook email address.

    Initial Customer Sign Up

    The sandbox and production environments use separate credentials.

    Follow these steps to get a new sandbox customer. If you already have a sandbox customer and want to add a new user e.g., with Microsoft account credentials, you can skip to the user invitation steps.

    1. Open a browser and navigate to https://sandbox.bingads.microsoft.com?simpsp=true&id1=1.
    2. Select Sign up now.
    3. Select Create an account to create a Microsoft account (MSA).
    4. Select Get a new email address.
    5. Enter an MSA email address. The email server must be outlook.com (for example, ******@outlook.com). **
      ** Important **** Sandbox supports MSAs created using an outlook.com email account only. Also, you may not use an email account from another email service (for example, @contoso.com) even if the account is linked to an outlook.com email account.
    6. Finish the MSA work flow by specifying the rest of your user and security information. You will then be redirected to Microsoft Advertising to continue the sandbox customer and account sign up.
    7. Fill out the Create Account form.
    8. For Go Live, select Skip payment information.

    Optional: Invite More Users

    To authenticate with OAuth in sandbox, you need a Microsoft account (MSA) created with an outlook.com email account. If your sandbox customer does not yet have user credentials via a Microsoft account, or your sandbox customer was created with an outlook-int.com email account, you need to invite a user to work on your sandbox account via the following steps.

    1. In Microsoft Advertising sandbox, select Settings.
    2. Select User management.
    3. Select Invite user.
    4. Enter the email address of the user to invite. The email server must be outlook.com (for example, ******@outlook.com). Important You may send invites to outlook.com email accounts only. You may not send invites to any other domain, even if the account is linked to an outlook.com email account. If you try to send an invite to another domain (for example, ******@contoso.com), the BingAds UI will show the invite as pending indefinitely (the invite is never sent).
    5. Select Send.

    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

    1 person found this answer helpful.
    0 comments No comments

  2. MS Advertising - Vahid 110 Reputation points Microsoft External Staff Moderator
    2025-09-08T09:48:23.14+00:00

    Hello Esther,

    Thank you for using our Microsoft Advertising Learn Q&A Platform! 

    It seems that you are struggling with your API Sandbox. I will be happy to escalate the matter further and relay everything from your side to our API experts for a thorough troubleshooting. Please respond to my private message at your earliest convenience. I also hope the information provided here can be of some use to you.

    Microsoft Advertising provides an API sandbox environment where you can test your application before deploying it to the production environment. Ads that you create in sandbox are not served. Supported services in sandbox vary from production. To get the web service addresses for supported services, see Bing Ads API Web Service Addresses.

    To refresh the token for your Bing sandbox account, you should use the following steps:Use the Correct Endpoint: Ensure that you are using the correct endpoint for OAuth requests, which is https://login.microsoftonline.com. This is the recommended endpoint for both sandbox and production environments.

    Microsoft Account Requirement: Make sure that the Microsoft account (MSA) email address you are using to log into the sandbox is an outlook.com email address. The sandbox environment requires this specific type of email for authentication.

    Developer Token: While you can use the universal developer token BBD37VB98 in the sandbox, you must use your own application ID (client ID) that you registered for your application.

    Get Access and Refresh Tokens: Follow the steps outlined in the Quick Start guide to obtain the access and refresh tokens using the correct credentials and endpoint.

    If you continue to face challenges, please ensure that your application is correctly registered and that you have the necessary permissions set up for the sandbox environment. For further information, please go through the documentation: Microsoft Advertising Sandbox - Microsoft Advertising API | Microsoft Learn.

    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

  3. Esther Brodt 11 Reputation points
    2025-09-08T09:54:35.44+00:00

    Microsoft Account Requirement: Make sure that the Microsoft account (MSA) email address you are using to log into the sandbox is an outlook.com email address. The sandbox environment requires this specific type of email for authentication.

    The email address I'm using to log into the sandbox is not an outlook address. How do I get an outlook address and how can I connect it to my existing sandbox?

    0 comments No comments

  4. Esther Brodt 0 Reputation points
    2025-09-09T10:48:12.4333333+00:00

    Thank you. I followed the instructions to create the outlook user and add the new user to the sandbox.

    Now when I follow instructions to refresh the token, I get the following:

    "unauthorized_client: The client does not exist or is not enabled for consumers. If you are the application developer, configure a new application through the App Registrations in the Azure Portal"

    When I follow the link provided, I get this message:

    "The ability to create applications outside of a directory has been deprecated. You can get a new directory by joining the M365 Developer Program or signing up for Azure"

    So I cannot register my sandbox unless I pay for one of these options?

    0 comments No comments

  5. MS Advertising - Vahid 110 Reputation points Microsoft External Staff Moderator
    2025-09-10T10:49:31.7433333+00:00

    Hi Esther,

    You are welcome. Thank you for your detailed responses.

    I've messaged you privately so that we can discuss your account specifics. I will be more than happy to escalate your case to our API experts in order to provide you with the best solution(s) possible.

    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.