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

Sign in to queue

The Discussion

  • User profile image
    MikeEEE

    Super cool!

  • User profile image
    didaskein

    Thanks ! Azure Friday always interesting ;)

  • User profile image
    Aldo

    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

    Thanks!

  • User profile image
    mattchender​son
  • User profile image
    artisticche​ese

    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
    mattchender​son

    @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
    jas

    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
    mattchender​son

    @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