none
Authenticate Using REST RRS feed

  • Question

  • I just want to authenticate with Office 365, get back the access token, and then use this to access calendar records. I will just be using a simple REST client. I have an app ClientID

    I've been trying to follow this:

    https://dev.outlook.com/restapi/getstarted

    It says to use this Url:

    GET https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=<CLIENT ID>&redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F&response_type=code&scope=https%3A%2F%2Foutlook.office.com%2Fmail.read

    But, when I hit this Url, it spits back HTML. Actually, it spits back the Office 365 login page. What am I supposed to do with HTML? I need to get back the result of the authorization request.

    PS: I keep reading that I'm supposed to use oAuth, but that makes no sense. oAuth is for scenarios where the user can punch in the username and password in a web page and get a cookie is later stored. That's not what I'm trying to do at all. My system is a back end system with no UI. There are no cookies involved.
    Wednesday, August 31, 2016 4:27 AM

Answers

  • Office 365 does have an exchange server. The server Url is:

    https://outlook.office365.com/ews/exchange.asmx

    Because I can use Exchange, I don't have to use the whacky oAuth system.

    I've provided some sample code here:

    http://stackoverflow.com/questions/39242526/consume-office-365-rest-api-without-ui/39262312#39262312

    Thursday, September 1, 2016 3:52 AM