400 error for https://login.microsoftonline.com/common/oauth2/token post request React Typescript

I am trying to do a post request to in react typescript applicationenter image description here

I am getting a 400 error while making a post request in my React Typescript Application

1 Answer

To achieve the above requirement, You need to use the below workaround.

When you are adding client id and client secret ,In this case there is no need to provide username and password.

You can achieve this with client id and client secret and adding scope to it.

To get the scope details you can find as below:enter image description here

SCREENSHOT FOR REFERENCE:-In grant type use "client credential" instead of passwordenter image description here

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like