Setting Up OneDrive/SharePoint Integration
Wagtail OneDrive/SharePoint integration relies on Microsoft APIs, which you will first need to enable for your project:
-
Navigate to the Microsoft Azure app registrations page
-
If you don't have a registration for your project, create a new registration now.
-
Either while creating your registration, or by selecting your project and navigating to
Authentication, add a newredirect URI:If you have included
wagtail_content_import.urlsas follows:url(r'ADDITIONAL_URL_PATH/', include(wagtail_content_import_urls))
The redirect URI will be: https://BASE_URL/ADDITIONAL_URL_PATH/microsoft/auth/
(substituting BASE_URL for your site's url, and ADDITIONAL_URL_PATH for the path under which you have included wagtail_content_import.urls)
-
Navigate to
Authentication. UnderImplicit grant, addAccess tokensandID tokens, and save. -
Finally, navigate to
Overview, and copy theApplication (client) IDinto theWAGTAILCONTENTIMPORT_MICROSOFT_CLIENT_IDsetting.
Note: you may need to configure your server to set a Cross-Origin-Opener-Policy of "unsafe-none" for the file picker popup to function correctly. On applications running Django versions >= 4 and using django.middleware.security.SecurityMiddleware, this can be done by setting SECURE_CROSS_ORIGIN_OPENER_POLICY = "unsafe-none".