![]() To authenticate an IMAP server connection, the client must respond with an AUTHENTICATE command in the following format: AUTHENTICATE XOAUTH2 In case of shared mailbox access using OAuth, application needs to obtain the access token on behalf of a user but replace the userName field in the SASL XOAUTH2 encoded string with the email address of the shared mailbox. SASL XOAUTH2 authentication for shared mailboxes in Office 365 IEV3QkFBbDNCQUFVRkZwVUFvN0ozVmUwYmpMQldaV0NjbFJDM0VvQUEBAQ= ![]() dXNlcj10ZXN0QGNvbnRvc28ub25taWNyb3NvZnQuY29tAWF1dGg9QmVhcmVy Note that line breaks are inserted for readability. SASL XOAUTH2 encodes the username, access token together in the following format: base64("user=" + userName + "^Aauth=Bearer " + accessToken + "^A^A")įor example, the SASL XOAUTH2 format to access with access token EwBAAl3BAAUFFpUAo7J3Ve0bjLBWZWCclRC3EoAA is: EwBAAl3BAAUFFpUAo7J3Ve0bjLBWZWCclRC3EoAA^A^A")Īfter base64 encoding, this translates to the following string. OAuth integration requires your application to use SASL XOAUTH2 format to encode and transmit the access token. You can initiate a connection to Office 365 mail servers using the IMAP and POP email settings for Office 365. Your app can get new access tokens as older ones expire. When a user approves the offline_access scope, your app can receive refresh tokens from the Microsoft identity platform token endpoint. In addition, you can request for offline_access scope. Make sure to specify the full scopes, including Outlook resource URLs, when authorizing your application and requesting an access token. You can use one of our MSAL client libraries to fetch an access token from your client application.Īlternatively, you can select an appropriate flow from the following list and follow the corresponding steps to call the underlying identity platform REST APIs and retrieve an access token. To use OAuth, an application must be registered with Azure Active Directory.įollow the instructions listed in Register an application with the Microsoft identity platform to create a new application.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |