Error: Access token is empty (when trying to retrieve email attachment)

Jeff Louie 0 Reputation points
2023-02-04T08:18:59.78+00:00

I am new to Graph API.

I am trying to read/save an email attachment. But when I send my request I am getting “Access token is empty” message in return

I am able to read my Inbox messages, so I want to believe the token I’m using is valid. I do have Mail.Read permissions granted, though I saw somewhere that that only allows viewing email metadata in general, but does not give permissions to reading the message body and attachments.

I am at a loss as to what permission allows access to the attachments. In Graph Explorer there is not a specific example showing how to save an attachment and the permissions needed to do so. Or am I doing something incorrect?

Also in GExplorer, one can grant account privileges while trying out the examples. Is there a formal portal page to see the entire universe of available privilege options? Or is this sandbox the only place?

Thanks, Jeff

Microsoft Security Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. RajeshKumarMSFT 1,976 Reputation points Microsoft External Staff
    2023-02-06T06:57:59.9366667+00:00

    Hi Jeff Louie,

    Hope you are doing well.

    Please make sure add the required scopes before performing graph Operations to resolve the issue.

    Follow this link how to consent permissions using Graph Explorer

    Please refer graph API permission details below in one place.

    For more information on granting account privileges, please take a look to:

    Let us know if this answer was helpful to you or if you need additional assistance. If it was helpful, please remember to accept it so that others in the community with similar questions can more easily find a solution.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.