You opened it from . MSAL and the file picker do not work from a
file:// URL (treated as a unique/null origin), and the CDN script may be blocked.
Serve it locally instead (from the folder containing this file):
REM Windows (Python):
py -m http.server 8080
REM or Node:
npx http-server -p 8080
Then open: http://localhost:8080/onedrive-picker-local-test.html
Register as a SPA redirect URI in Azure AD.
1. Azure AD configuration
Register the exact value above under your app registration →
Authentication → Single-page application → Redirect URIs.
2. Run the flow
Auth status: signed out
Clicking the button checks if you are authenticated; if not it redirects you to the
Microsoft sign-in, then discovers your SharePoint/OneDrive site, gets a SharePoint token,
and opens the picker.
3. Flow log
OneDrive picker (inline)
4. Picked file(s) — all information returned
Raw pick payload (JSON)Tokens (for inspection — decode at jwt.ms)