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);
});
Also in JavaScript:
- form taglib in jsp
- how to change the font family using jquery
- es6 array sum javascript
- openssl error Subject does not start with '/'
- javascript date countdown
- js code
- how use modal in login button click in react js
- name class and id referance in ajax
- js replace blogger thumb
- nodejs add to array
- format JSON code javascript
- .filter js
- js entries
- abstraction in javascript
- Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project electronicbookshop: Compilation failure
- pi in js
- javascript for loop[
- javascript conditional
- date.parse string to javascript
- sort a string in javascript
- random item from array javascript
- You seem to not be depending on "@angular/core" and/or "rxjs". This is an error.
- jquery count selected options
- javascript get index