locked
Can't authenticate with OAuth in sandbox RRS feed

  • Question

  • Hi!

    I'm trying to test an app using the sandbox.

    I've gone through the sandbox access steps described at https://docs.microsoft.com/en-us/bingads/guides/sandbox?view=bingads-12:

    • set up a @outlook-int.com email address
    • signed up for the sandbox, with the @outlook-int.com email
    • created an app in the sandbox at https://apps.dev.microsoft-int.com/#/appList and created a password for it

    When I try to go through the OAuth code grant workflow (https://docs.microsoft.com/en-us/bingads/guides/authentication-oauth?view=bingads-12#authorizationcode) with the sandbox app's client ID, using this URL:

    https://login.live-int.com/oauth20_authorize.srf?client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&scope=bingads.manage&response_type=code&redirect_uri=https%3A%2F%2Flogin.live.com%2Foauth20_desktop.srf&prompt=login

    I get the error "The provided value for the input parameter 'redirect_uri' is not valid. The expected value is 'https://login.live.com/oauth20_desktop.srf' or a URL which matches the redirect URI registered for this client application."

    (URL: https://login.live-int.com/err.srf?lc=1033#error=invalid_request&error_description=The+provided+value+for+the+input+parameter+'redirect_uri'+is+not+valid.+The+expected+value+is+'https://login.live.com/oauth20_desktop.srf'+or+a+URL+which+matches+the+redirect+URI+registered+for+this+client+application.)

    Same thing happens when I change the `redirect_uri` to use live-int.com instead of live.com.

    I am not sure whether the sandbox doesn't support OAuth, or what steps I may have been missing, or if the sandbox is down for service.

    Any help is appreciated. Thank you!

    - Eric

    Wednesday, August 15, 2018 9:54 PM

Answers

  • Hi Eric.

    Did you add the 'Native' application platform and do you see 'urn:ietf:wg:oauth:2.0:oob' and 'https://login.microsoftonline.com/common/oauth2/nativeclient' as redirect URIs?

    Add Platform - Native

    If not, please try to add them as a workaround.

    I hope this helps,

    Eric

    Thursday, August 16, 2018 7:44 PM

All replies

  • Hi Eric.

    Did you add the 'Native' application platform and do you see 'urn:ietf:wg:oauth:2.0:oob' and 'https://login.microsoftonline.com/common/oauth2/nativeclient' as redirect URIs?

    Add Platform - Native

    If not, please try to add them as a workaround.

    I hope this helps,

    Eric

    Thursday, August 16, 2018 7:44 PM
  • Yes, that works -- thank you!
    Wednesday, August 22, 2018 2:47 PM