You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to sync my .net calendar to office365 calendar.
I will use:
standard http endpoint and authorization code flow for obtaining access token and refresh token
these token then I will store at my db
after that, when it comes request (because its azure function), I need to perform some operation, for example to create a new Event on Calendar365.
I will get my token, or refresh token from db and use GraphApi SDK in order to obtain these data.
Now I discovered how to pass accessToken and initialize a GraphServiceClient:
public GraphServiceClient GetAuthenticatedGraphClient(string accessToken)
{
if (!string.IsNullOrEmpty(accessToken))
{
return new GraphServiceClient(new AuthenticationProvider(accessToken));
}
else
{
throw new Exception("AccessToken is not populated.");
}
}
So for each recevied event from my local queue, I need to trigger some method which will for some particular user grab the token, and call GraphAPI.
Should I go for Singleton instance and then just re-enter the access token? any concerns about that?
Is there a way to put in builder service some code which tells application to obtain the code automaticaly?
Thanks
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
Hello,
I want to sync my .net calendar to office365 calendar.
I will use:
Now I discovered how to pass accessToken and initialize a GraphServiceClient:
So for each recevied event from my local queue, I need to trigger some method which will for some particular user grab the token, and call GraphAPI.
Should I go for Singleton instance and then just re-enter the access token? any concerns about that?
Is there a way to put in builder service some code which tells application to obtain the code automaticaly?
Thanks
The text was updated successfully, but these errors were encountered: