Posts

Showing posts with the label AAD

Ensure SharePoint User with Power Automate

Image
 I had to set custom permission and grant access to some users based on their email address. All those users were member of the organization so they exist in our Azure Active directory (AAD). B ut, to set this permission, user must exist in the SharePoint information list too. So I used a function named:  EnsureUser . As its name suggests, this function ensures there is a record of the current user in the user information list in the current Site collection. To call this function with Power Automate, I used the Send HTTP request SharePoint Connector like below. Site address : Your site address. Method : POST URI : _api/web/ensureuser Header :  Accept: application/json;odata=verbose Content-Type: application/json;odata=verbose Body:  { 'logonName': 'i:0#.f|membership|jane.doe@yourDomain.com' } If the HTTP call is successful, the output will  give you: User id (from the user information list) User name (property Title ) User email UPN (User Principal Name) I...

Guest user can't access Client Side Assets resources in SharePoint App Catalog site

Image
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.co...