For automating text notifications to users through Microsoft Teams, the sender's account is authenticated using Selenium in Python script. The sender's authentication tokens are used to send One-on-One or Group Teams message using Microsoft Graph API.