Skip to content

Instantly share code, notes, and snippets.

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 elliotfiske/ccf81266be6ead10823a53c094749234 to your computer and use it in GitHub Desktop.
Save elliotfiske/ccf81266be6ead10823a53c094749234 to your computer and use it in GitHub Desktop.
Import this as a Postman collection to test Office365 message-getting. Don't forget to put in your own Bearer token, or another form of authentication.
{
"info": {
"_postman_id": "084e1aa4-990f-47be-a872-8687ad49f7f8",
"name": "Office365",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Office365 StackOverflow thing",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "<BEARER TOKEN GOES HERE>",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "https://outlook.office.com/api/beta/me/messages?$select=Id,Subject,InternetMessageHeaders",
"protocol": "https",
"host": [
"outlook",
"office",
"com"
],
"path": [
"api",
"beta",
"me",
"messages"
],
"query": [
{
"key": "$select",
"value": "Id,Subject,InternetMessageHeaders"
}
]
},
"description": "Get all email from Office365 and get the Internet Message Headers."
},
"response": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment