Thanks for posting your question in the Microsoft Q&A forum.
Ensure your app registration in Azure AD has the correct permissions(Mail.Send , Mail.Send.Shared) and check that admin consent has been granted for these permissions.
Properly configuring Sender Policy Framework
and DomainKeys Identified Mail
can help improve email deliverability and enable and configure DKIM in Microsoft 365
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful