How to get Outlook Access token?

爷,独闯天下 提交于 2019-12-24 21:16:12

问题


I'm using the outlook calendar rest api from Salesforce. To continuously leverage the calendar API I need to get authorisation code, access and refresh token.

I have been able to get the Authorisation code by hitting the API. How to get the access token using development code to use the outlook calendar rest API.


回答1:


Please find the list of AAD authentication libraries here:

https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-authentication-libraries




回答2:


I found this tutorial in Python very helpful for getting access codes:

This tutorial uses Microsoft Graph (which covers several Microsoft products including Microsoft Outlook) rather than the outlook REST API (which covers just Outlook).

https://docs.microsoft.com/en-us/outlook/rest/python-tutorial

At first, I thought setting up a Django server was overkill. Then I realized that I wanted a way for my Python instance to capture the access code after going through single-sign-on. (I MUST use my browser for single-sign-on because my institution uses multi-factor authentation.) Having a Django server is a natural way to do this.

So I created a new PyCharm Django project (which is straight-forward in PyCharm) and began following the tutorial.

I found it essential to continue following the tutorial all the way through displaying my emails to avoid getting authentication errors -- deviate from the tutorial, and I got error messages (such as this one) that were unpenetrable.



来源:https://stackoverflow.com/questions/44890198/how-to-get-outlook-access-token

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!