From Azure registration to your first imported file – built on a real-world setup, including every error that appeared along the way and how it was solved.
From version 1.8.3 the plugin uses its own file browser, fetching your files via Microsoft Graph – Microsoft's data API. Microsoft's old built-in file picker (OneDrive.js v7.2) is not used; it has been retired and no longer works reliably for personal accounts.
Files.Read.All).
Hubbo Document Viewer.On the app's Overview page, copy the value next to Application (client) ID – a long string like 28fdfec3-ce39-489b-b13b-0301ef5623ff. You will need it in step 3.
In the app's left-hand menu, under Manage, click Manifest (the row with the {} icon). Three things need to be set in the text file.
Find the line "replyUrlsWithType": [] and replace it with (swap hubbo.se for your own domain):
"replyUrlsWithType": [
{
"url": "https://hubbo.se/wp-content/plugins/hubbo-document-viewer/onedrive-redirect.html",
"type": "Web"
}
],
?page=…) – Azure will refuse to save. The type must be "Web", not "Spa" (SPA causes the unsupported_response_type error). And keep the comma after the closing bracket.
Find these two lines and change both from false to true:
"oauth2AllowIdTokenImplicitFlow": true, "oauth2AllowImplicitFlow": true,
Find the "signInAudience" line near the end of the file and make sure it reads:
"signInAudience": "AzureADandPersonalMicrosoftAccount",
"PersonalMicrosoftAccount" you will get the error "The request is not valid for the application's 'userAudience' configuration" at sign-in. The plugin uses Microsoft's common sign-in endpoint (/common/), which requires the value above.
Click Save at the top. A green tick means the Azure part is done. Wait 3–5 minutes before testing – changes do not take effect immediately.
The table covers every error that appeared during the real-world setup this guide is based on.
| Symptom | Cause | Solution |
|---|---|---|
| "invalid_request: redirect_uri is not valid" | The redirect URI in Azure does not match the one the plugin sends. | Check that the manifest contains exactly …/hubbo-document-viewer/onedrive-redirect.html (step 2.1). |
| "The URL must not contain a query string" when saving | The redirect URI contains ?page=…. |
Remove everything from the question mark onwards. |
| "unsupported_response_type" after sign-in | The URI is registered as Spa, or the implicit flow is disabled. |
Type "Web" + both implicit lines true (steps 2.1–2.2). |
| "…not valid for the application's 'userAudience' configuration" | signInAudience is set to personal accounts only. |
Change it to "AzureADandPersonalMicrosoftAccount" (step 2.3). |
| Sign-in succeeds but no file list appears | Older version (1.8.2–1.8.4) using a popup window; browsers block the communication. | Update to 1.8.5+ which uses a full-page flow. |
| "The download URL … was blocked" | Older version (≤1.8.6) downloaded via a direct link whose domain was not allowlisted. | Update to 1.8.7 – the server fetches via Microsoft Graph instead. |
| "The sign-in … has expired" / HTTP 401 | The token is older than about one hour. | Click the OneDrive button again to renew the sign-in. |
| Authentication (Preview) won't load in Azure | Known portal bug for personal accounts. | Use the Manifest page instead. Incognito or entra.microsoft.com may also help. |
| Microsoft's sign-in page keeps "spinning" | Temporary slowness at Microsoft, sometimes worsened by tracking protection. | Close and try again. CORS errors about events.data.microsoft.com are harmless (telemetry). |
| "OneDrive is not configured" | The Microsoft Client ID is missing from the settings. | Enter the Application (client) ID under Settings → Cloud import (step 5). |
Why does the setup look the way it does? The decisions in brief.
/me/drive/…/children).sessionStorage within the same tab.microsoftpersonalcontent.com) that are hard to allowlist safely. The server fetches via graph.microsoft.com with the user's token and follows the redirect – the SSRF protection keeps its short, safe list.onedrive-redirect.html loads no WordPress, so the return trip is fast.