Root cause: OneDrive integration broken globally — IceWhale's Azure client_secret has expired (AADSTS7000222)

Summary

OneDrive integration in ZimaOS is broken globally because the client_secret of the Azure AD application registered by IceWhale (client_id 0eb0522d-48a2-4115-a190-00c00514d29d) has expired. Microsoft Entra rejects every OAuth flow attempt with AADSTS7000222, and icewhale-files does not surface this error to the user — the OAuth popup closes silently.

This affects every ZimaOS user attempting to connect or reconnect OneDrive. The fix has to come from IceWhale: generate a new client_secret in the Azure portal, then ship it in a ZimaOS update.

Environment

  • ZimaOS: v1.5.4 (build 2026/02/03)
  • Files frontend: v0.0.34
  • rclone: v1.70.0-DEV
  • Hardware: ZimaBoard 2

User-visible symptoms

  1. OneDrive (and sometimes Dropbox) mounts disappear from the Files app.
  2. Attempting to re-add OneDrive: the OAuth login popup briefly opens and closes immediately before the user can sign in.
  3. No error message is shown in the UI.
  4. Backup jobs whose destination is OneDrive cannot complete.
  5. The browser console shows:
Uncaught (in promise) SyntaxError: "undefined" is not valid JSON
    at JSON.parse (<anonymous>)
    at tI.re (Files-D38fqq2b.js:2059:23612)

These symptoms match the following existing community reports, neither of which has been resolved:

Root cause (from backend logs)

journalctl on the icewhale-files service reveals the actual upstream error returned by Microsoft Entra during the OAuth callback:

May 10 16:14:50 ZimaBoard2 icewhale-files[1266]:
2026-05-10T16:14:50.477-0300  error  Then init error:
{
  "error": "AADSTS7000222: The provided client secret keys for app
            '0eb0522d-48a2-4115-a190-00c00514d29d' are expired.
            Visit the Azure portal to create new keys for your app:
            https://aka.ms/NewClientSecret, or consider using certificate
            credentials for added security: https://aka.ms/certCreds.
            Trace ID: 436e0a48-a848-4251-80d3-ce80e14d8000
            Correlation ID: aeeb1f0d-0b5f-45db-8680-639a4a508eb6
            Timestamp: 2026-05-10 19:14:50Z",
  "name": "onedrive",
  "func": "route.(*APIRoute).GetRecoverCallback",
  "file": "/home/runner/work/IceWhale-Files/IceWhale-Files/route/api_route_recover.go",
  "line": 205
}

The Trace ID and Correlation ID confirm this response originated from Microsoft’s authentication servers, not from rclone or ZimaOS. It is not a local misconfiguration, network issue, MFA problem, or redirect_uri mismatch.

Microsoft’s official documentation for this error: https://login.microsoftonline.com/error?code=7000222

Why this affects every user simultaneously

Azure AD client secrets have a maximum lifetime of 24 months. When the secret of a multi-tenant application expires, every OAuth flow for that application fails for every user, instantly and globally. No per-user remediation is possible — only the application owner (IceWhale) can rotate the secret.

A directly comparable historical incident: Astiga (a third-party OneDrive integration for music streaming) suffered this exact failure mode in 2021. All their users were unable to connect to OneDrive until the provider rotated their Azure client secret. See Astiga — Azure client key expired for the post-mortem.

Why the UI silently fails

Two compounding backend issues hide the real cause from users:

  1. The error from GetRecoverCallback (api_route_recover.go:205) is logged correctly, but the HTTP response body sent back to the frontend appears to be empty/undefined.
  2. The frontend (Files-D38fqq2b.js, function re, around line 2059:23612) calls JSON.parse() on the response without guarding against an undefined value. The resulting SyntaxError is an unhandled promise rejection, so the popup just closes — no toast, no console message visible to a non-technical user, no entry in any UI-level log.

Even after the secret is rotated, this graceful-error-handling gap is worth addressing separately — a clear “OneDrive sign-in failed, please try again” message would have saved a lot of debugging time for many users.

Reproduction (one-liner)

On any ZimaOS install, attempt to add or reconnect OneDrive in the Files app, then run:

journalctl --since "5 minutes ago" -u icewhale-files | grep AADSTS7000222

If AADSTS7000222 appears, the report applies.

Suggested actions for the IceWhale team

  1. Urgent: Generate a new client_secret in the Azure portal for application 0eb0522d-48a2-4115-a190-00c00514d29d and ship it in the next ZimaOS update.
  2. Recommended: Migrate from client secret to certificate credentials, which Microsoft recommends for long-lived integrations and which can be configured with longer expiries (or auto-rotation). See https://aka.ms/certCreds.
  3. Add a calendar reminder to rotate the secret well before its expiry. Microsoft sends notifications, but they are easy to miss.
  4. UI hardening: In Files-D38fqq2b.js at the call site of JSON.parse, guard against undefined/empty responses and surface backend errors (or at least a generic failure message) to the user. This is a small fix with high ROI for diagnosability.

For users currently affected

Until IceWhale releases a fix, OneDrive integration in ZimaOS Files is non-functional. Manual workarounds — registering your own Azure application and editing /var/lib/casaos/rclone.conf directly with personal client_id/client_secret values — are technically possible, but the Files UI and Backup app may not integrate cleanly with manually-created remotes (the UI adds custom fields like mount_point, used, total, username that aren’t part of standard rclone configuration).

I am happy to provide additional logs, run further diagnostics, or test a fix once available.

3 Likes

Thank you for your feedback. We will fix this issue as soon as possible.

2 Likes

Is this being looked at, it’s currently stopping me from setting up an offsite backup ?

Yes, we are currently working on fixing this issue.

Is there any update on this, it’s been a while now and no offsite backup :slightly_frowning_face:

Yeah, crazy that there is still no fix for this.

Please wait for the new version to be released.

When will the new version be released it’s been 41 days since this issue was raised, I am having to back up onto disks and rotate them leaving one at work just so I have an offsite backup

Hello frome France,

The issue still seems to be present in 1.6.1 :frowning:

Sorry for the delayed reply. We expect to release a new beta version next week. We’ve also adjusted our key policy to allow for timely fixes of any issues rather than waiting for a release new version. We hope you can help us with testing.

No problem—just keep us posted on any changes and updates, and we’ll test them :slight_smile:

Jerry, is there an estimated date for the new release? I haven’t upgraded to 1.6.1 yet due to the bugs that were found, and we’re also waiting on the OneDrive issue to finalize our backups.

Many thanks!!

We expect to release a beta version this week, and we would appreciate your assistance in testing it.

Hello, we have released version 1.6.2 beta, and this issue has been fixed. Could you please assist us with testing?
Release 1.6.2-beta1 · IceWhaleTech/ZimaOS · GitHub

Hello, we have released version 1.6.2 beta, and this issue has been fixed. Could you please assist us with testing?

Is there a guide on how to update the system without wiping etc, doesn’t seem this can be done from GUI?

You can try this way to upgrade your system.

ZimaOS 1.6.2-beta1 — Security Audit
Host 192.168.1.143 · 2026-07-02 · Authorized, non-destructive · Full report: ZimaOS-1.6.2-beta1-Security-Audit.md

Verdict. The OneDrive outage (AADSTS7000222) is fixed — verified end-to-end (live Graph quota + folder listing); the fix is server-side at IceWhale’s broker cloudoauth.files.casaos.app. The critical known CVEs are confirmed patched on this build. Five issues remain open; the systemic one is the “localhost is trusted” v1 API.
Fixed — re-tested live :white_check_mark:
CVE Class Result
CVE-2026-21891 (9.4) Service-account auth bypass all logins rejected (400)
CVE-2026-28286 (8.6) Authed create in /etc blocked (400)
CVE-2026-28442 (8.5) Authed delete in /etc blocked (400)
CVE-2026-28798 (9.1) /v1/sys/proxy SSRF route gone (404)
CVE-2026-41176 rclone RC-daemon RCE (<1.73.5) ships v1.74.3-adrive.4 — :warning: custom fork
CVE-2023-37266 Empty JWT HMAC secret ES256, 3 h expiry
Open on beta1 :warning:

Files: AppData folder inaccessible — /DATA/AppData → 400 invalid path while root lists fine. Functional regression; beta2 promised.
Info leak: /v1/users/status unauthenticated over LAN — leaks device state.
Auth model: legacy v1 API trusts localhost without auth — /v1/users/name → admin username (localhost-scoped; should not be a trust boundary).
Secrets: rclone.conf world-readable (0644) — holds OneDrive refresh token → should be 0600.
Perms: world-writable (0777) app-registration dirs — apps run as root → local tamper surface.
1 Like

Hello, that works with your patch… I can access to my onedrive account :slight_smile: thank you

Seems like the token pass through is working however it doesn’t seem like it supports onedrive for business unfortunately.