Closed lostmsu closed 1 year ago
Thanks for reporting this. I can reproduce. I'll investigate.
Update: It's not limited to personal accounts. The SDK is not including the version segment in the URL. This URL is wrong:
https://graph.microsoft.com/me?%24select=displayName,mail,mailboxSettings,userPrincipalName
Between the graph.microsoft.com
and the /me
should be a version segment, /v1.0
. The correct URL should be:
https://graph.microsoft.com/v1.0/me?%24select=displayName,mail,mailboxSettings,userPrincipalName
This appears to be an issue with the SDK. I'm finding out more from the engineering team.
Ok, so while they sort out this issue, here's a workaround. In GraphClientFactory.cs, change the line that creates the requestAdapter
to:
var requestAdapter = new HttpClientRequestAdapter(
new BlazorAuthProvider(accessor), null, null, httpClient)
{
BaseUrl = "https://graph.microsoft.com/v1.0"
};
Where did you get the code?
Describe the bug
When I login with Microsoft personal account and the app tries to query my information, I receive HTTP 400 bad request
For
https://graph.microsoft.com/me?%24select=displayName,mail,mailboxSettings,userPrincipalName
:To Reproduce
Steps to reproduce the behavior:
Expected behavior
User information is retrieved.
Screenshots
Desktop
Dependency versions