Microsoft Advertising API Sandbox OAuth settings

Jon Oler 21 Reputation points
2021-08-06T21:56:48.57+00:00

I am attempting to test the OAuth flow for a web application using the Microsoft Ads Sandbox. We've had this working in our application for years, but awhile back (like a few years ago), this functionality stopped working for us in the sandbox, but since things worked fine with the production Microsoft Ads API, we didn't do anything about it. We are in the process of reworking this OAuth code and would like to test it against the sandbox, but we can't because I'm getting this error:

We're unable to complete your request

invalid_request: The provided value for the input parameter 'redirect_uri' is not valid. The expected value is a URI which matches a redirect URI registered for this client application.

121332-screenshot-2021-08-06-154304.png

The reason we're getting this error is because the OAuth redirect urls have, in fact. changed due to the recent changes we've made to our application. The OAuth redirect urls are configured for applications like that through some sort of a "development center" application that allows developers to enter the valid redirect urls for their application. We have this configured for our production application, but we can't find we're to configure this for the Microsoft Ads API sandbox. I know that several years ago, I configured these settings for the MIcrosoft Ads API Sandbox, but I don't know where to configure these settings these days. I found this post: https://social.msdn.microsoft.com/Forums/en-US/d1b68bc8-e5db-4fe4-be5b-0dd0261e8639/cant-authenticate-with-oauth-in-sandbox?forum=BingAds that says that the settings can be edited here: https://apps.dev.microsoft-int.com/#/appList. However, when I go there, I get this:

121249-screenshot-2021-08-06-154728.png

I don't want to add an app in the Azure portal because I already have an app. Would the Azure portal even let me add a app for the Microsoft Ads API sandbox anyway (or would it just be a production app)? When I click the link to add and app to the Azure portal, I am unable to login with my sandbox account, anyway, so I can't even try to add my sandbox app:

121351-image.png

The Azure Portal claims it can't find dev@finch .com, but that is definitely my Microsoft Ads API sandbox user. In any case, I'm very confused about how I am supposed to change the OAuth settings for my Microsoft Ads API sandbox application right now. The settings UI just seems to have disappeared with no alternative to replace it? It used to work, but now it says I can't use the old UI any longer because it's a "converged application" (whatever that means), and I can't seem to use the Azure Portal to do it, either. Can you tell me how I can change the settings of my Microsoft Ads Sandbox application?

Thanks,

Jon

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

3 answers

Sort by: Most helpful
  1. Jon Oler 21 Reputation points
    2021-08-26T16:10:51.497+00:00

    Can anyone from Microsoft please help with this? Our sandbox account is completely unusable for Microsoft Advertising API testing because of this problem. We just want to be able to configure our sandbox account, but we don't know where we can do that now.

    Thanks in advance,

    Jon

    1 person found this answer helpful.

  2. Tomasz Ruszel 0 Reputation points
    2023-11-08T13:36:53.76+00:00

    I have the same problem, we can't use the sandbox. Attempting to create an application in the sandbox results in an error. Using the ID 4c0b021c-00c3-4508-838f-d3127e8167ff results in an unauthorized URL error. Is it possible to use sandbox and if so, how?

    0 comments No comments

  3. Julian Selser 0 Reputation points
    2024-04-30T16:58:59.6533333+00:00

    Having the same issue, is there a way to use sandbox accounts while using oauth settings for the web auth flow? If not using the desktop flow, the SDK requires a secret Id and we dont have one since there is no azure registered app

    0 comments No comments

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.