#Debugging

5 Followers · 175 Posts

Debugging is the process of finding and resolving defects or problems within a computer program that prevents the correct operation of computer software or a system.

Contestant
Article David Hockenbroch · Apr 28 2m read

. . . you are not alone. 

Help is available.

This took me a while to figure out, and I assume there may be others struggling too. I made my way through all the Entra stuff to set up a client credentials workflow to send email through a Microsoft 365 account. I was able to successfully retrieve my token, but I couldn't ever get it to authenticate with the SMTP server using the %Net.SMTP class. There were two parts to fixing this.

First, the authenticator's access token needs to be more than JUST the access token. It has to be formatted as:

set smtp.authenticator.AccessToken = "user="_emailaddress_$C(1)_"auth=Bearer "_token_$C(1,1)
2
0 43