Posts

Display a SharePoint Power Apps form in SharePoint page

Image
It's possible to display a SharePoint Form customized using Power Apps into a SharePoint page. Form displayed from SharePoint page Why should do that? Gather information from a form and store it into a SharePoint list. You can start from a data model. Based on fields used in your list, Power Apps will provide controls that work with your data types.   It does more than Microsoft Forms by providing: defaulted values, validation, conditional display, get data form other resources etc..  It provides a User Interface that can be quickly customized. It's more secure because it's based on your SharePoint list access.  Set Power Apps Application First, customize your SharePoint form as you want. Once it's done get the app Id. To get the App Id , go to Settings then Support then session details. Finally copy and save the App ID  value. Set your form default mode to New . Insert into SharePoint Page Edit the page that must content your SharePoint form. Add PowerApps...

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

One or more field types are not installed properly. Go to the list settings page to delete these fields.

Image
Recently, I was using a Power Automate workflow to create folder structure inside SharePoint Document Set. Everything went well except... at workflow execution. I got an error message saying:  One or more field types are not installed properly. Go to the list settings page to delete these fields . I had 27 fields to reviews. I decided to delete set of 3 fields and re-run my workflow and so on. The issue was due to a field that had encoded space at the end of his internal name like below. isProcessReviewed _x0020_ Luckily because my document library was empty so deleting fields was an acceptable solution otherwise we could have lose data. An other option could be extract list schema using PnP PowerShell and review list and fields definition.

How to give app access on a specific SharePoint site using Azure AD API permission

Image
Sometime, you want to give third party applications access to a specific SharePoint online site collection using Microsoft Graph API or SharePoint API.  You can achieve this in two steps : Set up API Permission from App registration Grant app access to the specified site collection Set up API Permissions In azure AD, select your app registration. Then go to API permissions, click on add a permission. Add API Access Select Microsoft Graph or SharePoint, then application permissions. Pick Sites.Selected permissions, select it then click on Add permissions. Choosing selected sites permissions Now your permissions are selected you must grant admin consent. At this point, you have given to your app selected site collections permissions but you did not define what permission level to use nor what site collection can be access by your app. Grant App access to your site collection You will need pnp management shell to do this, your App Id, and the url of the site collection that will be ...

Use Admin consent in Power Apps application

Image
P ower Apps applications are based on graphical components (buttons, text boxes, images, etc.) and connectors (access data from external tools). Those connectors are very easy to set up and use current user data access. When a user accesses a Power Apps application for first time, he gets a popup requesting him to consent. In fact, users must allow the application to do some actions on their behalf, example: post a message on Yammer, retrieve information from a SharePoint list, etc. It can be annoying to display this popup to everyone the first time they use the app. You may use admin consent to offer a seamless experience and prevent this modal to be displayed.  Prerequisites To do this, you must be able to grant consent as Administrator which means you must have one of those roles: Global Administrator, Privileged Role Administrator, Cloud Application Administrator, or Application Administrator. You will use some PowerShell commands with power apps module. To install Power Ap...

Deploy SPFX web part to only one Site Collection

Image
Most of the time, when you deploy a custom web part that you made or a third party one, it becomes available for any user of your SharePoint. This means collaborator can edit a page and install the custom web part into it then every user with access to your site can use it. There is a centralize place where administrator can deploy those applications and give access to them. This place is called Tenant App catalog. Basically, this is a site collection that has been designed to host web parts and related resources. However, you may want to deploy your custom application only to a specific site collection. Instead of using the Tenant Catalog Site, you will need to create a Site Collection App Catalog in the site collection of your choice. To do so, you will need to run the following PowerShell command: Add-SPOSiteCollectionAppCatalog Then deploy your App like you would in the App Tenant Catalog.  Keep in mind    This does not prevent your app to query other site collection....

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