How to use a single GraphServiceClient instance in a multitenant app #2893
Unanswered
GeorgiusLing
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
We have an ASP app that calls Graph API against different tenants. The tenant is programmatically determined by the parameters or JWT claim in the received requests. We do not want to create a new GraphServiceClient every time a request arrives, since it could make dependency injection impossible and unit tests extremely hard (if not totally impossible). So my question is, how can we use a single GraphServiceClient to make calls to different tenants?
I found an almost identical issue #838 , but it was raised back in the days of Graph SDK V3 or V4, and the solution doesn't seem applicable to Graph SDK V5. Is there a working solution in V5?
Beta Was this translation helpful? Give feedback.
All reactions