Answers for "get an access token for microsoft graph api using javascript"

0

get an access token for microsoft graph api using javascript

const postData = {
  client_id: APP_ID,
  scope: MS_GRAPH_SCOPE,
  client_secret: APP_SECERET,
  grant_type: 'client_credentials'
};

axios.defaults.headers.post['Content-Type'] =
  'application/x-www-form-urlencoded';

axios
  .post(TOKEN_ENDPOINT, qs.stringify(postData))
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.log(error);
  });
Posted by: Guest on September-23-2020

Code answers related to "get an access token for microsoft graph api using javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language