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'm upgrading an app from v 1.0.22 to v1.0.34 of the OutlookServices .NET client library. I have existing code that creates a message and then sends it like this:
When I do that, the REST call does not include the access token because the OutlookServicesClient doesn't have a populated access token value. The result is a 401 (unauthorized) error.
If I add the message to the drafts folder before sending it, I don't have this problem because the AddMessageAsync method uses the access token getter method that I supply in the constructor to refresh the access token:
I've stepped through the code and confirmed that AddMessageAsync calls the access token getter method.
I did not see this issue in v 1.0.22 of the library. Should the SendMailAsync() method always refresh the access token, just as AddMessageAsync does? If not, how can I ensure that the OutlookServices client will pass an access token with the request?
The text was updated successfully, but these errors were encountered:
I'm upgrading an app from v 1.0.22 to v1.0.34 of the OutlookServices .NET client library. I have existing code that creates a message and then sends it like this:
await outlookClient.Me.SendMailAsync(message, true);
When I do that, the REST call does not include the access token because the OutlookServicesClient doesn't have a populated access token value. The result is a 401 (unauthorized) error.
If I add the message to the drafts folder before sending it, I don't have this problem because the AddMessageAsync method uses the access token getter method that I supply in the constructor to refresh the access token:
await outlookClient.Me.Messages.AddMessageAsync(draft);
I've stepped through the code and confirmed that AddMessageAsync calls the access token getter method.
I did not see this issue in v 1.0.22 of the library. Should the SendMailAsync() method always refresh the access token, just as AddMessageAsync does? If not, how can I ensure that the OutlookServices client will pass an access token with the request?
The text was updated successfully, but these errors were encountered: