How to fetch office365 unread emails using postman

New Contributor

I am trying to fetch unread emails from inbox of my office365 account using postman.

With the help of Microsoft Graph API reference i am able to generate access token as in below format:



    "token_type": "Bearer",
    "expires_in": "3600",
    "ext_expires_in": "0",
    "expires_on": "1539180610",
    "not_before": "1539176710",
    "resource": "",
    "access_token": <ENCRYPTED_TOKEN>

However my requirement is to fetch unread mails from Inbox. 


Using the following link seems that can be possible, however while using in postman, getting "Invalid authentication, access token is empty" error.'Inbox')/messages?$select=sender,subject

Can anyone please tell me how to append access token with the above code, if this is the right one.


Or if you know any simple and better procedure to fetch unread emails from office365 account, please advice.

3 Replies

You add the token to an auth header, something like this:


   'Authorization'="Bearer aaaaaaaaaaaaaaaaa"

While doing so with the below code:

GET /v1.0/me/messages HTTP/1.1
Content-Type: application\json
Authorization: Bearer eyJ0eXAiOiJK..................

Getting below error. Have I missed anything?

"error": {
"code": "UnknownError",
"message": "",
"innerError": {
"request-id": "bafebf1b-9c36-4571-81be-29d54468b172",
"date": "2018-10-10T19:36:40"

No idea, sorry. UnknownError doesn't give us much to work with :)