Hello,
I registered new web-application in "Microsoft Registration Portal". Wrote some server code in my service and managed to get access token for user with next scopes:
- openid
- offline_access
- https://outlook.office.com/Mail.ReadWrite
Next step I tried to do was https://msdn.microsoft.com/en-us/library/dn440163.aspx (yes, I've read Important notice on top of the page, but it is kind of unclear related to my situation).
Made XOAUTH2 authenticate to SMTP server (smtp-mail.outlook.com):
......
OK
send: 'AUTH XOAUTH2 dXNlcj1....9AQE=\r\n'
reply: '535 5.0.0 OAuth failed: OAuth authentication failed due to Invalid token. Code -2147184118\r\n'
reply: retcode (535); Msg: 5.0.0 OAuth failed: OAuth authentication failed due to Invalid token. Code -2147184118
Apparently my access token was invalid.
Question is next: should my access token with scopes above, acquired from https://login.microsoftonline.com, give me ability to authenticate in outlook SMTP server at all? Or this feature is already deprecated? ... If not, then how can I get proper access token? Is it possible to get such token for application registered through Microsoft Registration Portal?
Thanks.