How-to
Prerequisites
-
Read this document to get a fundamental understanding of how to us Graph Explorer and to consent to permissions.
-
A User account with M365 license is required so you can run the Mail Graph API queries. You can click here to read details about how to grant a user an M365 license. You will have issues with any of the Mail queries without an M365 license.
1. How to: - Run a simple Graph API Query
-
Navigate to the Graph Explorer by clicking here.
-
Click on the Sign in icon to the right and sign in to your Azure Account.
-
You will need to consent to allowing Graph Explorer to read your profile infomation.
-
Once you consent, you can click on Run Query to execut the GET request to https://graph.microsoft.com/v1.0/me. It will return the following results:
2. How-to: - Get the total count of messages in your inbox
Note: refer to item 3 in the prerequisites section
- Run a query to get the total message count in your inbox folder by entering the following query:
Important Note If you don’t have a M365 license then you don’t have a mailbox, so you will get the following error when running this query:
Otherwise, if you have a M365 license/mailbox, the query will return the following results:
Useful resouces for this topic
Portal to manage consent permissions
Graph Explorer