none
Unable to find refresh token in O365 iOS SDK RRS feed

  • Question

  • Hello,

    I am developing iOS native application using O365 SDK for iOS. I want to send email with attachments. For this I want to send refresh token to Microsoft server to get new access Token with aud value : 

    https://outlook.office365.com/

    Right now aud value in my token is

    https://api.office.com/discovery/

    I'm unable to get existing value for refresh token to generate new access token.

    I've used following iOS SDK

    https://github.com/OfficeDev/O365-iOS-Connect#office-365-connect-app-for-ios

    Monday, July 18, 2016 7:52 AM

All replies

  • Hi ,

    I am not familiar with Objective-C , but i would suggest you to use ADAL for Objective-C to get a access token for Outlook service , not acquire a access token with refresh token which you got for Discovery Service .


    Tuesday, July 19, 2016 8:34 AM
    Moderator
  • Hi,

    Thanks for the reply, refresh token is required for getting authenticated by O365 REST API for sending mail, It can be fetched from pod class ADTokenCacheStoreItem class and we need to send it in following format to https://login.windows.net/common/oauth2/token and we can have access token with aud:https://outlook.office365.com

    "grant_type=refresh_token&refresh_token=your_refresh_token&client_id=your_client_id&resource=https://outlook.office365.com"





    Wednesday, July 20, 2016 10:12 AM
  • Hi ,

    Seems you have solved your problem.  If you have any other question , please feel free to let me know .

    Thursday, July 21, 2016 2:35 AM
    Moderator