Samples of Azure Durable Functions accessing the Graph API

Daniel Niccoli 196 Reputation points
2023-05-25T08:23:05.03+00:00

I'm looking for advice or samples of an Azure Durable Function (C#, Isolated) that accesses the Graph API. There is a sample here, but it does not use Durable Functions, which are quite different. For example, Durable Functions use static classes and static methods, which is why you can't simply use the approach from the sample I linked and transfer it to a durable function.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,929 questions
Developer technologies | C#
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pramod Valavala 20,656 Reputation points Microsoft Employee Moderator
    2023-05-31T19:05:15.5833333+00:00

    @Daniel Niccoli Durable Functions don't necessarily need to be static classes or methods. They can be regular classes and instance methods, allowing you to use Dependency Injection to inject the Graph Client like the sample linked.

    The only thing to consider is that since orchestrator code needs to be deterministic, the Graph Client calls should be made in Activity Functions.


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.