-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding OneDrive integration fails in 2025.2b #137120
Comments
Hey there @zweckj, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) onedrive documentation |
Looking at OneDrive support, it's not just account inactivity that can cause it to be frozen, but also can happen when exceeding storage quota: https://support.microsoft.com/en-us/office/what-does-it-mean-when-your-onedrive-account-is-frozen-5e76147b-b7d5-4bcb-ba28-b91e3eb636b6 I believe the free tier has 5GB storage which you can definitely exceed with HA backups. So this might end up being a more common scenario and not just an edge case. |
I can't find anything in the docs how a frozen OneDrive responds. Since you are a developer, could you try installing import asyncio
from msal import PublicClientApplication
from onedrive_personal_sdk import TokenProvider, OneDriveClient
from onedrive_personal_sdk.const import HttpMethod, GRAPH_BASE_URL
class DummyAuthProvider(TokenProvider):
def __init__(self, token: str):
super().__init__()
self._access_token = token
def async_get_access_token(self) -> str:
return self._access_token
async def main():
app = PublicClientApplication(
"afe53287-d3dd-4136-afa3-47b282ed76cd",
authority="https://login.microsoftonline.com/consumers",
)
result = app.acquire_token_interactive(
scopes=[
"Files.ReadWrite.AppFolder",
]
)
token = result["access_token"]
auth_provider = DummyAuthProvider(token)
client = OneDriveClient(auth_provider)
result = await client._request_json(
HttpMethod.GET, f"{GRAPH_BASE_URL}/me/drive/special/approot:"
)
print(result)
asyncio.run(main()) |
I just sent you an email |
The problem
Tried numerous times to set up the OneDrive integration and it was successfully linking to Nabu Casa (see image below):
But after this, it would show a blank "Error" dialog with no text at all:
Was unsure what was causing it, then when troubleshooting I visited my OneDrive account and noticed it was frozen, I assume due to a lengthy period of inactivity (it's attached to an outlook email that I never use so was unaware of this). Started the unfreeze account process which takes up to 24 hours.
This might be more of an edge case I guess, but would be nice if there was an informative error message (or even repair issue) when the OneDrive account is frozen.
Below is what was in system logs:
What version of Home Assistant Core has the issue?
2025.2.0b4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
OneDrive
Link to integration documentation on our website
https://rc.home-assistant.io/integrations/onedrive/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: