Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OutlookServicesClient.Me.SendMailAsync does not refresh access token #105

Closed
jamescro opened this issue Jun 17, 2015 · 3 comments
Closed

Comments

@jamescro
Copy link

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?

@datimson
Copy link

datimson commented Jan 5, 2016

I'm experiencing the same problem. Any update on this?

@stokara
Copy link

stokara commented Feb 11, 2016

Same issue. Is the source for outlookClient library available anywhere?

@mattgeim mattgeim self-assigned this Mar 21, 2016
@MIchaelMainer
Copy link
Member

Deprecated API. Use Graph client libs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants