Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
The screenshot of my submission instructions is as follows:
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
During September 2025, we will remove support for Basic auth with the Client Submission (SMTP AUTH) endpoints: smtp.office365.com smtp-legacy.office365.com Once Basic auth is permanently disabled, any clients or apps connecting using Basic auth with Client Submission (SMTP AUTH) will receive this response:550 5.7.30 Basic authentication is not supported for Client Submission. What do I need to do if I can use OAuth with Client Submission (SMTP AUTH)? If your client supports OAuth, follow these steps: Authenticate an IMAP, POP or SMTP connection using OAuth https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth Because of the above reasons, I have to use oauth authentication smtp connection. I refer to above link development. I don't know if I understand it correctly.I refer to this step to develop. 1. I register my application with Microsoft Entra. The permission requested by the application is Mail.Send,offline_access,SMTP.Send,User.Read. 2.Get an access token with OAuth2 device authorization grant flow. post https://login.microsoftonline.com/common/oauth2/v2.0/devicecode To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code XXXXXX to authenticate. Use this account(@outlook.com) to authenticate successfully. post https://login.microsoftonline.com/common/oauth2/v2.0/tokenSuccessfully obtained the token The permission is Mail.Send,SMTP.Send. "token_type": "Bearer", "scope": "SMTP.Send Mail.Send", "expires_in": 3600, "ext_expires_in": 3600, "access_token": "EwA4BMl6BAAUBKgm8k1UswUNwklmy2v7U/S+1fEAAb9XPqpV+OBTrTnCSfEoa4y9lzlLbRy/HGMJ... 3. smtp server : smtp.office365.com , port 587, starttls. I use SASL XOAUTH2 format to encode and transmit the access token. base64("user=" + userName + "^Aauth=Bearer " + accessToken + "^A^A"). The base64 decoded string is user=@outlook.comauth=Bearer EwA4BMl6BAAUBKgm8k1UswUNwklmy2v7...U C: auth xoauth2 S: 334 C: dXNlcj1xaWFuNjY1MEBvdXRsb29rLmNvb... S: 535 5.7.3 Authentication unsuccessful [SI2PR06CA0012.apcprd06.prod.outlook.com 2025-04-24T09:33:05.942Z 08DD81FD8DFF148B] I have obtained a token and have been authenticated to have sufficient permissions. Why does the SMTP server fail to authenticate? Is there something wrong with my username? Or is there something wrong with the app settings? Or is there a token permission issue?
Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Why can't my submission message have a carriage return or line break?