Fix Home Assistant Microsoft 365 Repeated Authentication Issues
Question details
The user is experiencing an issue where Home Assistant repeatedly prompts for Microsoft 365 authentication upon every system restart, failing to retain the login state.

- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- Setting up or running the Microsoft 365 integration within Home Assistant.
- Observed behavior
- Despite successfully authenticating and receiving the initial token, the system fails to persist the authentication, forcing the user to re-authenticate with Microsoft 365 after every restart.
Ensure you have administrator access to both your Home Assistant instance and the Microsoft Azure portal before modifying application configurations and token directories.
Recreate Azure App Registration and Verify Settings
Deleting the faulty app registration and strictly following the configuration steps ensures that supported account types and permissions are properly assigned for the token to persist.
Incorrectly configured Azure app registrations are the most common cause of repeated authentication requests. If the app does not support personal Microsoft accounts or lacks the proper offline access permissions, the token cannot be renewed automatically.
Log in to the Azure Portal, navigate to 'App registrations', locate your existing Home Assistant app, and delete it to start fresh.
Click 'New registration'. Enter a name and under 'Supported account types', explicitly select the option that includes personal Microsoft accounts (e.g., Accounts in any organizational directory and personal Microsoft accounts) if you are using an Outlook.com or Live.com email.
Set the Redirect URI exactly as specified in the Home Assistant Microsoft 365 integration documentation to ensure the authentication handshake completes successfully.
Navigate to 'API permissions' and add all required permissions. Crucially, ensure that 'offline_access' is granted so the system can obtain a refresh token for persisting the session after a restart.

Verify Home Assistant Token Storage Configuration
Ensure Home Assistant has the necessary permissions to save the authentication token locally so it survives system reboots.
Experience Hassle-Free Office Work with WPS Office
Troubleshooting complex Microsoft 365 Azure integrations and cloud authentication loops can be frustrating. If you need a straightforward, robust office suite for your daily document needs, consider WPS Office. It provides a lightweight, free alternative with high compatibility for Word, Excel, and PowerPoint files—without relying on complex cloud authentication mechanisms.
- 1. Download the installer: Visit the official WPS Office website and click the Free Download button for your operating system.
- 2. Install the software: Run the downloaded installation file and follow the simple on-screen prompts to set up the suite on your computer.
- 3. Open and edit your files: Launch WPS Office to immediately start creating or editing your existing Word, Excel, and PowerPoint documents without mandatory cloud logins.

Frequently Asked Questions
Why does Home Assistant keep asking me to sign in to Microsoft 365?
This typically occurs if the authentication token isn't being saved correctly to your system's local storage, or if the Azure App Registration is missing the 'offline_access' permission, preventing Home Assistant from silently renewing the session.
Can I use a personal Outlook.com account for Home Assistant Microsoft 365 integration?
Yes. However, you must ensure that your Azure App Registration is specifically configured to support personal Microsoft accounts during the initial app creation in the Azure portal.
What API permissions are required for the Microsoft 365 token to persist?
While the specific Microsoft Graph permissions vary based on the features you use (like Mail.Read or Calendars.ReadWrite), you must include the 'offline_access' permission. This allows the application to receive a refresh token necessary for maintaining the connection after a restart.




