I Can't Find The Scope For The Bing Webmaster API for my App?

Matt Pattoli 0 Reputation points
2025-07-02T10:29:50.47+00:00

I am building oAuth for the Bing Webmaster API for users for my app and I am running into issues. I am getting back 'Invalid Client' with oAuth.

I have Microsoft Graph (1) User.Read permission added to the app. But I cannot figure out how to add the Bing Webmaster API permissions. It's not showing up in any search when I try to add that permission.

I can confirm I am approved in the partner center, and have the MPN number added to the application.

Bing | Bing Webmaster Tools
{count} votes

2 answers

Sort by: Most helpful
  1. Ian Trinh 640 Reputation points Microsoft External Staff Moderator
    2025-07-02T16:14:07.3433333+00:00

    Hello, Matt Pattoli

    Thank you for your feedback. I understand the challenges you've encountered while building OAuth for the Bing Webmaster API, particularly the inability to locate the corresponding permissions in the Azure AD application registration and receiving an “Invalid Client” error. This is a common yet confusing issue, as the permission management approach for the Bing Webmaster API differs slightly from that of the Microsoft Graph API and others.

    Here are some troubleshooting solutions:

    1. The correct scope for the Bing Webmaster API

    The resource URI (or “Audience”) for the Bing Webmaster API is:

    https://webmaster.bing.com/api/

    The specific scope used for management is:

    webmaster.manage

    This means that in your OAuth authorization request, you need to set the scope parameter to https://webmaster.bing.com/api/webmaster.manage.

    Why isn't it listed in the Azure AD portal?

    For some Microsoft first-party services, especially those requiring specific partner or developer center approval, API permissions are typically not selected through the “Add permissions” list in the Azure AD application registration interface. Instead, you indicate that your application needs access to the API by requesting a specific Scope in the OAuth flow, and users will then see a consent page requesting them to authorize your application to access their Bing Webmaster data.

     

    1. Resolving the “Invalid Client” error

    The “Invalid Client” error is typically not due to missing permission configurations in the Azure AD portal, but rather one of the following common causes:

    Incorrect client_id (application ID): Ensure that the client_id used in your OAuth request exactly matches the “Application (client) ID” generated in your Azure AD application registration.

    redirect_uri mismatch: This is one of the most common issues. The redirect_uri you provide in the OAuth request must exactly match one of the “Redirect URIs” configured in your Azure AD application registration, including case sensitivity and the trailing slash.

    Client key issue (if your app is a secret client): If your app is a “secret client” (e.g., a web app or backend service) and you are using the authorization code flow to obtain an access token, you must provide a valid client key. Ensure that the key has not expired and is correctly passed in the request.

    Application type mismatch:

    If you are building a public client (e.g., desktop app or mobile app), you should set “Allow public client flows” to ‘Yes’ under “Advanced settings” in the “Authentication” section of the Azure AD app registration. Public clients typically do not use client keys.

    If you are building a web application or backend service (secret client), ensure that you have correctly configured the client key.

    Authorization request parameter error: Check that all parameters in your authorization request URL (client_id, response_type, redirect_uri, scope, state, etc.) are correct.

     

    You mentioned that you have been approved in Partner Center and added the MPN number, which is a necessary step for accessing the Bing Webmaster API itself. However, this is an independent issue from the “Scope not found” or “Invalid Client” errors in the Azure AD OAuth process.

    We recommend using Postman or a similar tool to test your OAuth flow step by step, as this will allow you to clearly see the requests and responses for each step and identify the specific issue.

    I look forward to your feedback.

    Best regards,
    Ian Trinh | Microsoft Q&A Specialist


  2. Onyx Is here 0 Reputation points Independent Advisor
    2025-07-04T10:28:56.3366667+00:00

    @Matt Pattoli I see you're responding to Ian Trinh regarding the instructions he listed. The link you posted from Microsoft Learn does seem to be a bit out of date of about 3 years now. You may want to try his steps but still get in touch with Partner Center Support for more help

    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.