Build with an Azure free account. Get USD200 credit for 30 days and 12 months of free services.

Start free today

Navigating the Microsoft Graph with Azure Functions

Play Navigating the Microsoft Graph with Azure Functions
Sign in to queue


Matthew Henderson does a demo for Scott Hanselman to show how simple it can be to build serverless apps that leverage bindings for Microsoft Graph (e.g., reading data from a Microsoft Excel spreadsheet in a OneDrive folder) to avoid writing laborious initialization and authentication code, all using Azure Functions.

For more information, see:

Create a Free Account (Azure)





The Discussion

  • User profile image

    Super cool!

  • User profile image

    Thanks ! Azure Friday always interesting ;)

  • User profile image

    Hi all,

    I did the example to read data from Microsoft Excel spreadsheet but I'm getting this error:

    An unhandled exception occurred while processing the request.

    ServiceException: Code: BadRequest
    Message: Tenant does not have a SPO license.

    Could anyone please give me an idea on what could be happening?

    I'm new on Azure's world


  • User profile image
  • User profile image

    In demo showing using token (Token-In) function, parameter called graphToken was supposed to be provided as input but it was not provided when function was called during demo, URL which was used was actual function URL with no token specified. How did function received token for HttpClient call?

  • User profile image

    @artisticcheese:  In the case of this demo, a cookie from the browser session was being used. Just before the demo, I had logged into the function app by navigating to the /.auth/login/aad endpoint on the site (this requires App Service Authentication / Authorization to be enabled). That cookie was passed in on the requests you saw me making, so the binding was able to leverage that identity. I meant to say something about that at the start. Apologies for any confusion there!

  • User profile image

    same question as @artisticche​ese, how do i pass the token information when i am not in browser context? e.g. if this function is getting called as part of a workflow, and the calling function wants to pass a token into the function that will be calling the graph api. does it get added to the request json somehow? or is it part of a header?

  • User profile image

    @jas:Generally this is done via a token in a header. You can just put an AAD token (with an audience for your function app) as a Bearer token in the Authorization header.

Add Your 2 Cents