Hello,
Welcome to our Microsoft Q&A platform!
Error 403, or disallowed_useragent and a Google error
Google made an annoucement saying that they will block any OAuth in webviews, do you open the auth page in your application's webview?
If yes, Please set the IsUsingNativeUI
flag to true when you new OAuth2Authenticator()
like following code( I notice you set the IsUsingNativeUI to false). And install the latest Chrome and set Chrome as the default browser.
var authenticator = new OAuth2Authenticator(
clientId,
null,
Constants.Scope,
new Uri(Constants.AuthorizeUrl),
new Uri(redirectUri),
new Uri(Constants.AccessTokenUrl),
null,
true);
And If you use Android 11. please refer to this thread, add two intents in your AndroidManifest.xml file:
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.