Unable to perform sso authentication to authorization url of /authorize of Microsoft OAuth2.0

76 Views Asked by At

I am unable to perform sso authentication to authorization url of /authorize of Microsoft OAuth2.0 using curl command in command line.

Below is my curl request:

curl --user "user:password" -X POST -d "scope={scope}&client_id={client_id}&redirect_uri={redirect_uri}&response_type=code&grant_type=authorization_code&access_type=offline&response_mode=query" https://login.microsoftonline.com/{tenand}/oauth2/v2.0/authorize

Above request is redirecting me to microsoft sso login page.

How can authenticate this page using curl?

Current output I am getting is:

{"desktopsso":{"authenticatingmessage":"Trying to sign you in"}}

and after that process is getting failed.

I am expecting authorization code as output.

I have tried posting it through chrome and it returns desired output after the manual sso authentication.

Thanks in advance.

0

There are 0 best solutions below