Hi @Chandrakesh Pandey ,
I'm less familiar with Moodle, but the message does not provide a lot of details. You can follow the troubleshooting steps in this post and enable debugging to get more information by going to Site administration ▸ Development ▸ Debugging, Debug messages: DEVELOPER and Display debug messages: Yes . https://moodle.org/mod/forum/discuss.php?d=414291
When OAuth 2 authentication fails due to failure between Moodle and the issuer you will see the generic "error/Could not upgrade oauth token." You will have to look into the Moodle source code to see what is being returned by the issuer.
There was a similar issue described in this thread, and you can also check the troubleshooting steps there to see if it applies to your situation.
-
If the information helped you, please Accept the answer. This will help us and other members of the community as well.