We use the below URL to generate a code using OAuth 2.0
https://login.microsoftonline.com/common/oauth2/authorize
When we try to generate a Refresh and Access Token from code using this URL:
https://login.microsoftonline.com/common/oauth2/token
We get the following error message
Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '00000003-0000-0000-c000-000000000000 .
OAuth flow works when the code is generated in our desktop browsers. This error message is thrown only when the auth code is generated in mobile browsers.
Azure AD admin has enabled all users to allow mobile sign-in.