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

User is never authorized #1

Open
inakirzabalegui opened this issue Nov 28, 2017 · 5 comments
Open

User is never authorized #1

inakirzabalegui opened this issue Nov 28, 2017 · 5 comments

Comments

@inakirzabalegui
Copy link

It does not matter how many times you validate the user through oauth2.0 User Server Flow, it always come back with "Some error occurred. Make sure connected app is approved previously. Salesforce Response : {"error":"invalid_grant","error_description":"user hasn't approved this consumer"}" I am analyzing myself why.

@kvu-luong
Copy link

kvu-luong commented Jul 29, 2019

I also got this error etheir. @JitendraZaa Could you help us to figure it out why it happen. Appreciate any suggestion from you

@manzanofab
Copy link

Same same issue

@JitendraZaa
Copy link
Owner

Go to policies of connected App and change setting to "Preauthorized user can login" Add that user's profile in Connected app policy. This should resolve issue.

@akshayshete88
Copy link

I tried Authorization many times but with no success; Finally , I went through the entire code and made a bit change in the Body where we pass the parameters :

Just change the order of parameters you are passing as given below

Old : Body(string iss,string aud,string prn,string exp){ this.iss=iss; this.aud=aud; this.prn=prn; this.exp=exp; }

New: Body(string iss,string prn,string aud,string exp){ this.iss=iss; this.aud=aud; this.prn=prn; this.exp=exp; }

Hope It works for you as well. Good Luck!

@sahasuman17
Copy link

sahasuman17 commented Dec 25, 2020

Go to policies of connected App and change setting to "Preauthorized user can login" Add that user's profile in Connected app policy. This should resolve issue.

Throwing below error with above setting:
Some error occurred. Make sure connected app is approved previously. Salesforce Response : {"error":"invalid_request","error_description":"refresh_token scope is required and the connected app should be installed and preauthorized."}
@JitendraZaa

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

No branches or pull requests

6 participants