Below you will find pages that utilize the taxonomy term “REST API”
posts
Viva Connections Experiences to manage Home Site through REST API
Introduction The SharePoint Home Site experiences have moved to Viva Connections and is managed from the Microsoft 365 admin centre through the Viva Connections admin centre
I started exploring how to manage these SharePoint Home Sites/Viva Experiences using browser’s developer tools, considering I had little luck with the SPO PowerShell, PnP PowerShell, and CLI for M365. These PowerShell experiences will be updated at some point to work with the updated Viva Connections Experience.
posts
Remove Expired Sharing Links and Update Sharing Link Role to Read
Updating the expiration time and role for sharing links is still limited. Although it seems possible through the Graph API Update permission, I have been unable to pass the roles as body parameters.
Graph Explorer Attempts Using the following script:
Invoke-PnPGraphMethod -Url "v1.0/drives/$driveId/items/$driveItemId/permissions/$($ShareLink.Id)" -Method Patch -Content @{ roles = @("read") } threw the error message
“Invalid input: No Information provided to update the specifed permission”
From the UI Anyone link can’t be edited Organisation link can’t be edited Specific people links can be edited Using the network tab from the browser developer tools enables identifying the endpoint to update specific people links only.
posts
Retrieve SPFx Details from Tenant and Site Collection App Catalogs Using PowerShell
Have you ever needed to gather detailed information about SPFx solutions installed in your SharePoint environment, such as API permissions, for auditing, inventory, or compliance purposes? The PowerShell script below helps you retrieve these details from both the tenant-level and site collection app catalogs for auditing with the aim to improve security posture by removing unneeded apps and access rights.
To execute this script, you must have Global Administrator or SharePoint Administrator roles.
posts
Power Automate : Move File bypassing locked issue using CreateCopyJobs endpoint
The SharePoint - Move file action can be used to move files, however the file can’t be moved if the file was accessed by the current Power Automate flow for any processing reslutng in a locked file error.
{ “status”: 400, “message”: “File ‘Shared Documents/Attendances/To Be Processed/Attendance -16072024.xlsx’ cannot be moved because it is in locked mode.\r\nclientRequestId: d6df7566-881f-4f14-8548-c5fac1eda46d\r\nserviceRequestId: 606841a1-40f0-9000-9c69-507df9b21720” }
Handling Locked Files There are two options to handlelocked files when using SharePoint - Move file action:
posts
Power Automate: Retrieve User Details
This post covers how to leverage SharePoint REST API to get user details from Power Automate using the Send an Http request to SharePoint action.
Within a Power Automate flow follow the steps below to retrieve a user details.
Send an Http request to SharePoint action renamed to Get Page Author Details Site Address: https://test.sharepoint.com Method: GET URI: _api/Web/GetUserById(14) Here’s the output from the API:
Here’s the output from the API:
posts
Power Automate: Retrieve Users from a SharePoint Group
This post covers how to leverage SharePoint REST API to get users from a SharePoint group from Power Automate using the Send an Http request to SharePoint action. In the example below a SharePoint Group has been defined for approvers of a particular process and needed to be retrieved to be assigned an approval task.
Within a Power Automate flow follow the steps below to retrieve users from a SharePoint group.
posts
Power Automate : Update Author and Editor of a Page
This post outlines how to use Power Automate to update author and editor of a Page within SharePoint using the Send an Http request to SharePoint action.
Within a Power Automate flow, follow the following steps
Add Send an Http request to SharePoint renamed to Update Author Properties Property Value Site Address The SharePoint site URL Method POST Uri See Uri below Headers See Headers table below Body See Body below Uri _api/web/lists/GetByTitle(‘Site%20Pages’)/items(1)/ValidateUpdateListItem()`