Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get token failed! Unauthorized #3

Closed
IAmBlackat opened this issue May 18, 2021 · 29 comments
Closed

Get token failed! Unauthorized #3

IAmBlackat opened this issue May 18, 2021 · 29 comments

Comments

@IAmBlackat
Copy link

Hello,
I have tried using the app quite a few times and it always returns "Get token failed! Unauthorized" to me.
I have already given all of the permission to the app.

Please tell me what is wrong
Thanks

@beetcb
Copy link
Owner

beetcb commented May 18, 2021

Please show me what you have entered (screenshots or text)

Thank you for your cooperation

@movibeast

@IAmBlackat
Copy link
Author

https://pastebin.com/rBMqRH9t
To view, please use this pass -> QzFCQ0ZEKb
I have added it here

after you read, the data will be deleted. I have added everything so you can check. I think I have done everything correctly

@beetcb
Copy link
Owner

beetcb commented May 18, 2021

Wait a minute, do I need access to the API to view it? Looks like I need to login to their website to view the actual data 😂 :

image

@IAmBlackat
Copy link
Author

Now it will work @beetcb

@beetcb
Copy link
Owner

beetcb commented May 18, 2021

Got it.

@beetcb
Copy link
Owner

beetcb commented May 18, 2021

Plz check if is this url match the redirect_url in your azure?

https://heymind.github.io/tools/microsoft-graph-api-auth

Your account has a captcha protection mechanism, I can't log in at the moment

@IAmBlackat
Copy link
Author

image
Yes, I have added it. I thought that it maybe because "/" at the end so I added 2 links but still it didn't work.
Regarding captcha, I can send you code.

@beetcb
Copy link
Owner

beetcb commented May 18, 2021

Also, make sure you fill in the redirect address in your browser's address bar in this step.

image

Something like this :

https://x.x/?code=xxxxxxxxxxxxxxxxxxx

@IAmBlackat
Copy link
Author

Yes, I have done that. But it says authorization failed

@beetcb
Copy link
Owner

beetcb commented May 18, 2021

Looks valid, well then, looks like we have to log in and check.
BTW, how do I skip this step?

image

@IAmBlackat
Copy link
Author

Please use this RDP to access, I will login here
https://pastebin.com/fPB8ipkq

@IAmBlackat
Copy link
Author

IAmBlackat commented May 18, 2021

Just a min, I will login. It is not logged in yet. Just created rdp

@IAmBlackat
Copy link
Author

Added the authenticator in RDP, it is chrome extension. Please use that. @beetcb

@beetcb
Copy link
Owner

beetcb commented May 18, 2021

Is it okay now? @movibeast

@IAmBlackat
Copy link
Author

Yes @beetcb it is good now.
please use it

@beetcb
Copy link
Owner

beetcb commented May 18, 2021

Added the authenticator in RDP, it is chrome extension. Please use that. @beetcb

You mean using chrome remotedesktop extention?

@IAmBlackat
Copy link
Author

Nah, once you login to rdp like you did. You can see the Authenticator added there :)

@beetcb
Copy link
Owner

beetcb commented May 18, 2021

Cross-origin token redemption is permitted only for the 'Single-Page Application' @movibeast

@IAmBlackat
Copy link
Author

oh so I needed to selected that instead of web application? Can you change it for me because I think I may mess up

@beetcb
Copy link
Owner

beetcb commented May 18, 2021

  1. The client_secret you previously provided is invalid. I created a new one
  2. Cross-origin token redemption is permitted only for the 'Single-Page Application' -> this is the real error

@IAmBlackat
Copy link
Author

Thank you very much for the help!
Can you tell me how I can fix second issue?
{Cross-origin token redemption is permitted only for the 'Single-Page Application' -> this is the real error}

@beetcb
Copy link
Owner

beetcb commented May 18, 2021

oh so I needed to selected that instead of web application? Can you change it for me because I think I may mess up

Nope! This may actually be a bug from Microsoft. See this issue here onedrive-cf-index

My CLI basicly did the solution provided in that issue, should fix it, but failed in your case

@IAmBlackat
Copy link
Author

ding, so there is no solution at a moment for me?

@beetcb
Copy link
Owner

beetcb commented May 18, 2021

Try using the CLI again with my newly generated client_secret

Should work @movibeast

Cause during the rdp I was using that site to get it. Not the CLI tool

@beetcb
Copy link
Owner

beetcb commented May 18, 2021

Do this :

add-client-secret

@beetcb
Copy link
Owner

beetcb commented May 18, 2021

Then copy the value, not id @movibeast

@IAmBlackat
Copy link
Author

@beetcb finally it worked! thank you very much for all of your help. I really appreciate it.

@beetcb
Copy link
Owner

beetcb commented May 18, 2021

I totally understand these troublesome steps because I've been there, it's really torturous and I'm glad I could help you and reduce your pain 😊

@movibeast

@IAmBlackat
Copy link
Author

:) really happy that you build this tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants