How to Fix Cannot Embed Microsoft Forms in a SharePoint Page
Question details
The user is unable to embed a Microsoft Form into a SharePoint page due to a configuration error with the Forms web part.

- Product
- SharePoint and Microsoft Forms
- Device & OS
- not provided
- Scenario
- Attempting to embed a Microsoft Form into a SharePoint page to collect responses from users.
- Observed behavior
- The SharePoint Forms web part fails to load and displays an error message stating that 'servicePrincipalId must not be null'.
Ensure you have admin privileges for the SharePoint Admin Center, as resolving the API access issue requires tenant-level administrative permissions.
Enable API Access in SharePoint Admin Center
This is the primary solution to fix the 'servicePrincipalId must not be null' error by allowing the Forms web part to authenticate properly.
This error often occurs due to disabled API access within the SharePoint tenant. Enabling it allows the web part to securely retrieve form data.
Launch a private or incognito browser window and log into the SharePoint Admin Center with your administrator credentials.
In the left-hand navigation menu, select 'More features', and then click on 'Apps' to open the application management settings.
Locate the 'API access' option and enable it. Wait a few minutes for the server-side processing to apply the changes across the tenant.
Return to your SharePoint page, refresh the browser, and try adding the Microsoft Forms web part again.

Use the Embed Web Part as a Workaround
If you do not have admin access or if the global Microsoft issue persists, you can bypass the Forms web part entirely by using a standard Embed code.
Boost Your Productivity with WPS Office
If you frequently encounter technical issues or complex administrative barriers with Microsoft's cloud services, consider trying WPS Office. It is a powerful, lightweight, and highly compatible alternative that simplifies document management, form creation, and daily office tasks.
- 1. Download the Installer: Visit the official WPS Office website and click the free download button for your operating system.
- 2. Install the Software: Run the downloaded installation file and follow the quick on-screen setup instructions.
- 3. Start Creating: Open WPS Office to instantly begin creating documents, forms, and presentations without complex configuration.

Frequently Asked Questions
Why does the SharePoint Forms web part say 'servicePrincipalId must not be null'?
This error typically occurs when API access is restricted or disabled in the SharePoint admin center, preventing the Forms web part from authenticating and securely retrieving the form data from your tenant.
Can I embed a Microsoft Form without SharePoint admin privileges?
Yes. While you cannot fix the native Forms web part without admin access, you can use the Embed code workaround. Simply copy the iframe code from Microsoft Forms and paste it into a standard 'Embed' web part on your SharePoint page.
How long does it take for API access changes to take effect in SharePoint?
Server-side processing for API access changes can take anywhere from a few minutes to a couple of hours. If the web part still fails immediately after making the change, try refreshing the page later.
Is this a known global issue with Microsoft Forms and SharePoint?
Yes, Microsoft support has previously identified this specific authentication error as a broader tenant-level issue affecting multiple users. While they deploy global fixes, using the embed code remains the most reliable temporary workaround.




