Office 365 intergration - Oauth and Rest - Offline Access

jna2756
Tera Expert

HI all,

I am looking to set up oauth for Office365 to pull calendar details from it using REST calls. While I have set up the oauth Profile and am able to make REST calls to Office365, the token I receive only lasts for an hour. I know I need to request "Offline access" to it to get a token that will last longer but I can't figure out what parameters I need to pass it for me to get offline_access.

I saw on the below video that I need to create a custom Oauth API Script (which I did) and pass a parameter into the "preporcessauthcode" but I am not sure what parameters I need to pass in for office365. I tried "requestParamMap.put('access_type','offline_access');" but that still only gave me a 1 hour access token.

 

video link: https://www.youtube.com/watch?v=NyFooBktJNE

 

Thanks in advance,

Joshua Anderson

1 ACCEPTED SOLUTION

jna2756
Tera Expert

I figured out what I needed to pass in the request parameters....

requestParamMap.put('scope','openid offline_access https://graph.microsoft.com/mail.read https://graph.microsoft.com/calendars.read https://graph.microsoft.com/calendars.read.shared');

I needed to pass openid offline_access and the rights into the scope parameter.

 

Thanks,

Joshua Anderson

View solution in original post

1 REPLY 1

jna2756
Tera Expert

I figured out what I needed to pass in the request parameters....

requestParamMap.put('scope','openid offline_access https://graph.microsoft.com/mail.read https://graph.microsoft.com/calendars.read https://graph.microsoft.com/calendars.read.shared');

I needed to pass openid offline_access and the rights into the scope parameter.

 

Thanks,

Joshua Anderson