Guest user can't access Client Side Assets resources in SharePoint App Catalog site
When using third party web part or custom web part, there is a property named includeClientSideAssets that push resources to Client Site Assets library of the SharePoint App catalog site. Anytime a user is using one of those web parts, he will retrieve resources from this centralized area.
This Client site assets library is hidden and is at least read-only for every member of your organization but it is not accessible to external user. As consequence external users are getting errors like below.
[SPLoaderError.loadComponentError]:
Failed to load component "544c1372-42df-47c3-94d6-017428cd2baf" (pnpSearchResultsWebPart). Original error: Failed to load path dependency "SearchResultsWebPartStrings" from component "544c1372-42df-47c3-94d6-017428cd2baf" (pnpSearchResultsWebPart). Original error: Error loading https://component-id.invalid/544c1372-42df-47c3-94d6-017428cd2baf_4.1.0/SearchResultsWebPartStrings
Unable to load script https://mytenant.sharepoint.com/sites/AppCatalog/ClientSideAssets/59903278-dd5d-4e9e-bef6-562aae716b8b/search-parts-searchresultswebpartstrings_en-us_9aae9ccf7c7c12e9c05321896a08e265.js
INNERERROR:
Failed to load path dependency "SearchResultsWebPartStrings" from component "544c1372-42df-47c3-94d6-017428cd2baf" (pnpSearchResultsWebPart). Original error: Error loading https://component-id.invalid/544c1372-42df-47c3-94d6-017428cd2baf_4.1.0/SearchResultsWebPartStrings
In my case, the error was triggered using PnP search result web part.
The everybody security group does not include external user.
In order to give external user access to Client site assets library there are 3 options:
- Create dynamic group
- Use Office 365 CDN
- Enable/Disable All Users (membership) group display.
1 - Create a Dynamic group
2 - Use O365 CDN
- Public: Anybody with CDN resource URL can access them.
- Private: Any of your tenant user cant can access your resources.
O365 CDN flow - picture by Microsoft
3 - Enable/Disable All Users (membership) group display
- Everyone except external users
- All company members
Nice article, having exactly this problem installing PnPSearch with a client that only gives guest accounts to externals, giving option 3 a try
ReplyDeleteI'm glad this blog post has helped you. See you
Delete