{"id":19016560,"date":"2026-09-10T12:20:11","date_gmt":"2026-09-10T12:20:11","guid":{"rendered":"https:\/\/wordpress.org\/support\/?post_type=topic&#038;p=19016560"},"modified":"2026-09-10T13:24:18","modified_gmt":"2026-09-10T13:24:18","slug":"authentication-with-office-365-api-problem","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/authentication-with-office-365-api-problem\/","title":{"rendered":"Authentication with Office 365 API problem"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hi there,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I had the connection between Post SMTP and Microsoft365 API working perfectly fine and then all of a sudden all email sending is failing. <br \/><br \/>I did get this error message:<br \/>Code: 401, Message: Unauthorized, Body: {&#8220;error&#8221;:{&#8220;code&#8221;:&#8221;InvalidAuthenticationToken&#8221;,&#8221;message&#8221;:&#8221;ArgumentNull&#8221;,&#8221;innerError&#8221;:{&#8220;date&#8221;:&#8221;2026-09-10T12:09:56&#8243;,&#8221;request-id&#8221;:&#8221;2e5a93b5-3341-4d0c-b6cf-15155931b040&#8243;,&#8221;client-request-id&#8221;:&#8221;2e5a93b5-3341-4d0c-b6cf-15155931b040&#8243;}}}<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, I have created multiple times now a new app in azure and double checked that all is created according to the step by step guide of post smtp, but I always do get the same error code. <br \/><br \/>Now even when I want ro rerun the configuration wizard, I get this error:<br \/>Error retrieving access token. Try Again Now.<br \/><br \/>I have wordfence installed, but I did try to run the firewall in learning mode, disable the firewall and even deactivate wordfence completely, but still the same problem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Does anyone have an idea how I can fix this problem?<\/p>\n","protected":false},"template":"","class_list":["post-19016560","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19016560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19016560\/revisions"}],"predecessor-version":[{"id":19016636,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19016560\/revisions\/19016636"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19016560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}