Share via

error "invalid_client" - when scope has more than just "openid"

david 1 Reputation point
2021-11-15T07:55:50.327+00:00

Receiving an error after choosing an account (first step of consent screen). The second consent screen (where you choose to accept the apps permissions) is never shown.

The request params look like this...

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?
scope=openid+Calendars.ReadWrite&
response_type=code&
redirect_uri=https://localhost:5001/connectedapps/oauth/callback&
response_mode=query&
prompt=select_account

It's successful in either two cases:

  1. User is signing in a Microsoft Live Account i.e outlook.live.com account (all scopes can be included) OR
  2. Or The only scope is openid (but the account can be either a Microsoft Live account and Microsoft Office account i.e outlook.office.com - works for both)

The problem occurs when using both the openid + Calendars.ReadWrite scopes, but trying to sign in as a Microsoft Office user. The error returned to the API is "invalid_client". BUT it works for a Microsoft Live Account.

Microsoft Security | Microsoft Graph
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.