Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
GTowne
Contributor
Contributor

Issue with reading emails from OAuth2 Outlook server

I have currently followed the authorization flow outlined by Microsoft to attain an access token with permissions for both reading email via REST and IMAP. I have created Talend jobs with both approaches, but I have different problems in each.

In the IMAP job I use a TPOP component to connect. However the connection is not successful. I use my corporate email as my username, and the access token as the password. This does not seem to work. Is there something I'm missing here?

Also in the job I created, which uses REST, I am simply sending a GET Request to Microsoft's Mail.Read endpoint. I put the token in the header under '"AUTHORIZATION." This works when I use PostMan to send the request, but when I use the TRest component, I get the following error: "{

  "error": {

    "code": "InternalServerError",

    "message": "The MIME type 'text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2' requires a '/' character between type and subtype, such as 'text/plain'.",

    "innerError": {

      "date": "2020-08-18T20:44:00",

      "request-id": "07d1a007-30a3-424f-b9e3-9f97013db99a"

    }

  }

}|500"

Any suggestions would be greatly appreciated.

Labels (3)
2 Replies
jrius
Contributor II
Contributor II

I have the same problem. Regards.

gjeremy1617088143

Try setting the "Accept" header explicitly in your request. POSTman may be defaulting you to [Accept=text/html, image/gif, image/jpeg, *; q=.2, /; q=.2]