A collection of useful/not useful scripts to do queries against Microsoft Graph API
- Clone the repository to a place you want to run scripts from
- Set up a .env file with required values
GRAPH_CLIENT_ID=client-id from app reg
GRAPH_CLIENT_SECRET=client-secret from app reg
GRAPH_TENANT_ID=your tenant-id
GRAPH_SCOPE=https://graph.microsoft.com/.default or something else you need
- Set up config if you need something else than default
- Run from VSCode
- Result is found in result folder within Script directory
Script ansattoversikt-til-nettside
- Set up config if you need something else than default
- Run from VSCode
- Result is found in result folder within Script directory
- Inside the scripts folder, create a new folder with the name of the script.
- Then inside the new folder create config.js file if needed and an index.js file.
- Then create a new NPM script in the package.json file with the name of the script like this: "name-of-the-script": "node "scripts/name-of-the-script/index.js""
- All the scripts can be found in "NPM SCRIPTS" in vscode like seen in the pictures above.