Is the account you are testing syncing between your on-premises environment and Exchange Online?
401 Access denied error when you run the Test-OAuthConnectivity cmdlet
Also, I found this: Announcing Hybrid Modern Authentication for Exchange On-Premises
Regards
Shaofan
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.