Office 365 – Microsoft Graph – Part 3 – Azure Access Token: to call Graph APIs from CSOM

Hi All,

In this article we will discuss most important concept “Azure Access Token”, which we require to call Graph APIs.

In last couple of articles, we started discussion about Microsoft Graph and one simple use case – to fetch Office 365 groups using Microsoft Graph APIs and using CSOM.

We have certain steps to use Graph APIs and in last following couple of articles we are discussing those steps

Office 365 – Microsoft Graph and Graph Explorer

Office 365 – Microsoft Graph beginning – Part 1

Office 365 – Microsoft Graph – Part 2 – Granting permission to Azure Apps to use Microsoft Graph APIs using CSOM

In this article we will discuss most important concept – Azure Access Token, we require Access Token to call the Graph APIs.

Let’s begin the show:

What is Access Token?

Access Token is 64-bit encoded JSON Web Token (JWT)



Access token contains information about

  1. our app (claim).
  2. Permission app has for the resource (Microsoft cloud service => Office 365 Groups, Users, Mail, contact etc.) – ensures that caller has proper permissions
  3. It contains information about API available through Microsoft Graph

Steps to get the Access Token in CSOM code

  1. To call Microsoft Graph, our app must acquire an access token from Azure Active Directory (AD), Microsoft cloud identity service.
  2. Our app need to be able to authenticate with Azure AD.
  3. We attach the access token as a Bearer token to the Authorization header in HTTP request as


Authorization: Bearer EwAoA8l6BAAU … 7PqHGsykYj7A0XqHCjbKKgWSkcAg==

Host:` GET


Azure Active Directory access tokens

Authorize access to Azure Active Directory web applications using the OAuth 2.0 code grant flow

AuthenticationContext Class

AuthenticationResult Class

Thanks for reading 😊

Keep reading, share your thoughts, experiences. Feel free to contact us to discuss more.

If you have any suggestion / feedback / doubt, you are most welcome. Stay tuned on Knowledge-Junction, will come up with more such articles

One thought on “Office 365 – Microsoft Graph – Part 3 – Azure Access Token: to call Graph APIs from CSOM

This site uses Akismet to reduce spam. Learn how your comment data is processed.