Share via

How to get basic user information like email, name using access token provided by Bing Webmaster tools OAuth?

Mikhail Kashkin 0 Reputation points
2023-12-27T11:09:25.7933333+00:00

I'm working on a service that allow my users to get information from Bing Webmaster tools. And I found the documentation about how to implement OAuth flow located here https://learn.microsoft.com/en-us/bingwebmaster/oauth2.

It is working and I can get access and refresh tokens. It is working in my code now.

But I didn't find a way to get user information. I'm talking in particular about Microsoft.Bing.Webmaster.Api.Interfaces.

It is very important to create flow that allows users to "Login by Bing", since I need email and unique user id to create foreign keys between site and user tables.

I found that Microsoft Graph has required endpoin (https://graph.microsoft.com/v1.0/me) but it doesn't accept access_token produced by https://www.bing.com/webmasters/oauth/token. And Microsoft Identity platform doesn't have scopes that allow access to Bing Webmaster Tools.

At the same time Bing Webmaster OAuth doesn't have email or profile scopes. And, as I said before, doesn't have an endpoint to get this information.

I'm stuck and spend time to find solution by myself, but can't find an answer.

Community Center | Not monitored
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.