Unable to login: 401 Unauthorized (AADSTS700025)
MlgmXyysd opened this issue · 3 comments
Issue
Could not log in: verify you're using the client secret's value (not ID) and the API permissions are set correctly
Reason
Microsoft doesn't allow public client to redeem authorization code with client_secret
, so the login logic needs to update.
401 Unauthorized
error: invalid_client
error_description: AADSTS700025: Client is public so neither 'client_assertion' nor 'client_secret' should be presented.
error_codes: 700025
Target code
https://github.com/virtualzone/onedrive-uploader/blob/main/sdk/login.go#L98
Temp solution
Remove client_secret
in config:
{
"client_id": "xxxxxxxxxxxxxxxxxx",
"client_secret": "", <- Put to empty
"scopes" [
"Files.Read",
"Files.ReadWrite",
"Files.Read.All",
"Files.ReadWrite.All",
"offline_access"
],
"redirect_uri": "http://localhost:53682/",
"root": "/",
......
Hi @MlgmXyysd , I've tried to reproduce your issue but I can't. Have you followed the instructions from the Readme on how to create the app registration?
Hi @MlgmXyysd , I've tried to reproduce your issue but I can't. Have you followed the instructions from the Readme on how to create the app registration?
Having same issue and removing client secret worked, thanks for sharing