Skip to content

Instantly share code, notes, and snippets.

@nbellocam
Created February 6, 2018 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nbellocam/b6f0ae0d14df140cfdf3e50c3984f5b2 to your computer and use it in GitHub Desktop.
Save nbellocam/b6f0ae0d14df140cfdf3e50c3984f5b2 to your computer and use it in GitHub Desktop.
Calling Microsoft Graph API from an Azure Function using JavaScript - putting all together
const name = 'MyGroup';
getToken().then(token => {
console.log('Token OK. Next: create the group');
createGroup(token, name)
.then(result => {
console.log('Everything OK.');
console.log(result);
}).catch(() => {
console.log('An error occurred while creating the group');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment