Welcome to my blog! Be inspired and keep inspiring. Sharing is Caring
Recent posts
PowerShell: Identifying SharePoint Site Creation Sources
Introduction Understanding how a SharePoint site was created is crucial for governance, compliance, and troubleshooting. In Microsoft 365, SharePoint sites can be created through various methods, such as Microsoft Teams, Viva Engage, the SharePoint Admin Center, and more. However, identifying the exact creation source can sometimes be challenging.
For example, exporting the list of active sites from the SharePoint Admin Center may not always provide accurate information. Communication sites, for instance, may incorrectly show their creation source as “Microsoft M365 Group,” even though they can only be created from the SharePoint Admin Center.
read moreEmbedding Copilot Studio Agent in a SharePoint Page
Introduction Embedding a Copilot Studio Agent within a SharePoint page can significantly enhance user experience by providing seamless access to AI-powered assistance directly within the context of a SharePoint site. While there are examples of achieving this using SPFx (SharePoint Framework), I wanted to explore whether this could be done using out-of-the-box (OOB) features without custom development.
In this blog post, I will walk you through the steps to embed a Copilot Studio Agent into a SharePoint page using the Embed Webpart and site settings.
read moreSharePoint Agent and Responsible AI in Mental Health Support
Introduction Balancing AI safety measures and practical functionality for SharePoint Agents is key for some use cases due to the lack of customisation of the inbuilt content safety against the four categories: harm, self-harm, sex, and hate. A particular use case we wanted to explore was its use for mental health support agents in the form of virtual mental health first aiders. My partner in crime Lee Ford and I explored what we could do without tripping the Responsible AI principles and flagging Content Safety categories.
read moreExploring Ways to Access SharePoint Agent
Introduction SharePoint Agent is the easiest way to get started with building your own grounded Agents from your SharePoint data. The possibilities are vast, from HR agents to legal agents. If more configuration and features are required, the Copilot Studio or Azure AI Foundry could help.
Each SharePoint site comes with its own default Agent scoped to data within the site. As of today (i.e. March 2025), the default SharePoint agent can’t be modified.
read moreMVP Preparing for Renewal
Introduction Since January 2024, I have had the honor of being a Microsoft MVP. Now, it’s time to renew my MVP status, which requires gathering all my contributions to submit within the renewal application. I must admit, I haven’t been great at keeping track of my contributions every time I raise a Pull Request or write a blog post. But here’s what I’ve managed to pull together.
Pull Requests within Github I’ve successfully merged nearly 70 Pull Requests (PRs) in open-source PnP repositories, along with over 50 blog posts spanning areas like PowerShell, SharePoint, Azure DevOps, Power Automate, and M365 Copilot.
read moreIssues with Default Sensitivity Labels in SharePoint Document Libraries
Introduction Default sensitivity labels can be set at the document library level in SharePoint to help manage and protect your data.
However, there are some limitations and issues that you should be aware of like the default sensitivity label does not automatically update existing files within SharePoint and there might be delay in applying the sensitivity label within M365 app. This is described in the documentation for Configuring a default sensitivity label for a SharePoint document library.
read moreInheritance of Sharing Settings in Channel Associated SharePoint Sites
Inheritance of Sharing Settings in Channel Associated SharePoint Sites Channel associated SharePoint sites inherit the external and default sharing settings of the parent team except when the parent team default sharing link is set to “People with Existing Access” only during creation.
The two sections highlight the testing I have done by first updating the parent team sharing setting before creating a private or shared channel which creates the corresponding site in the background.
read moreAssigning Cognitive Services Roles in Azure AI Foundry to use Content Safety
Introduction Azure AI Foundry comes with built-in Safety + Security features, also known as Azure AI Services. However, you may encounter the following error message:
Your account does not have access to this resource, please contact your resource owner to get access
The Learn More link directs you to a possible fix: ensuring your account is assigned the role of Cognitive Services User for the Content Safety resource or Azure AI Services resource you’re using.
read moreConfiguring Default Sharing Links in SharePoint: Ensuring 'Specific People' Access
Introduction Updating the default sharing link from the User Interface at both the site level and tenant level to Specific People (only the people the user specifies) might not work always as expected. This issue could be due to the outdated setting DefaultSharingLinkType being updated behind the scenes.
I tested this on a Team site by updating the default sharing setting from the SharePoint Admin Centre to “People you choose”. However, the default sharing link for new sharing links did not reflect this setting.
read moreEliminating the Need for PATs in Azure DevOps for Power Platform CI/CD
Introduction The PAT(Personal Access Token) is the Azure DevOps personal access token which can be generated from your account settings and used for authentication when performing Git operations.
Cons using PATs Not conducive for teamwork: If the PAT belongs to a team member who leaves the organization, the release manager or another team member will have to generate their own PAT and update the pipeline. Security risks: Similar to a password, a PAT poses risks if leaked.
read moreHow to Delete App Users in Power Platform Admin Center
In the Power Platform Admin Center, you may have added app users that you no longer need. To view the list of app users added to an environment, navigate to the following URL https://admin.powerplatform.microsoft.com/manage/environments/c1725b9e-0000-0000-0000-000d3ad0000/appusers, replacing c1725b9e-0000-0000-0000-000d3ad0000 with your environment ID:
To delete an app user, click on the ellipsis (…) next to the app user and select the Delete button.
However, you may encounter a misleading error message:
✖ Failed to delete app user: User with SystemUserId= is not disabled.
read moreSharing Connection References with Service Principal in Azure DevOps for Power Platform ALM
Introduction When setting up your Azure DevOps pipeline for deploying a Power Platform solution, you may encounter an error message if your solution relies on connection references.
The reason given was : An unexpected error occurred.
This generic message does not provide much help and can occur for multiple reasons. In my scenario, it was related to the connection references in the target environment not being shared with the service principal.
read moreComparing File Collaboration and Search Features: SharePoint vs. Microsoft Teams
Introduction Microsoft Teams provides a unified platform for end users to collaborate on files stored within SharePoint. However, there are notable differences between the two platforms that can influence your decision on when to use SharePoint and when to use Teams.
Search Functionality Contextual Search Contextual search on libraries does not exist within Teams, while SharePoint offers richer contextual search at library, site, organization, and hub levels. Issue with Results from Shared Channels There is an issue searching contents within shared channels where the shared channel name is shown as Mock Team Name which is not helpful identitying the source of the search results without opening the file.
read moreSecure Power Platform Deployments with Azure DevOps Workload Identity Federation
Client secrets have traditionally been the go-to method for deploying Power Platform solutions from Azure DevOps, utilizing app registrations from the Azure platform. However, my personal experience has shown that this approach can be problematic, especially when you are not an application admin. It often involves wasting time figuring out why deployments have failed due to expired or missing client secrets. Even when reaching out to someone with application admin rights, they might generate a new client secret but forget to update the service connections for each service connection within Azure DevOps or the application admin does not have access requiring to reach out to someone else who have access, causing further disruptions.
read moreM365 Developer Tenant Challenges
My Visual Studio subscription was deactivated, resulting in the loss of my Azure subscription and licenses to access Microsoft Teams within my M365 developer tenant.
This post covers my attempts to recover access in vain.
Access to Microsoft Teams I thought I could extend my access to Microsoft Teams by opting for a free trial for Microsoft 365 E5 (no Teams) and Teams Premium - Microsoft Teams Premium.
However, this did not restore access to Microsoft Teams despite waiting multiple hours after I added the above licenses.
read moreUnderstanding Copilot Studio Agents App Registration
When you create an Agent within Copilot Studio, a corresponding App registration is automatically generated. These app registrations are named after the Agent, suffixed with “(Microsoft Copilot Studio)”. You can view these app registrations in the Azure Portal under App registrations > All applications.
Agent Certificates and Federated Identity Each app registration associated with a Copilot Studio Agent includes three certificates and two federated credentials as of January 2025. These components enable secure communication between agents and your data sources and services.
read moreAzure Subscription Transfer
Transferring an Azure subscription to a new tenant can be a complex process. I recently followed the instructions from How can I move a subscription to a new tenant? to move an Azure subscription to a new test tenant. However, the new test tenant was not appearing in the list of tenants I could move the subscription to. I realized that the account I was using needed to be a global admin in both tenants.
read moreGetting Started with the Power Platform Developer Plan
I had to set up a new developer tenant as my previous tenant became unusable due to an expired Visual studio subscription. Fortunately, there is plenty of help and documentation available to guide you through the process. Here’s a step-by-step guide on how to get started with the Power Platform Developer Plan.
Steps to Enable the Power Platform Developer Plan Sign Up:
Visit the Power Apps Developer Plan website. Click on the “Start free” button.
read moreEnsure Taxonomy Feature in SharePoint Sites Connected to Private/Shared Teams Channels
Introduction Taxonomy feature is not activated by default in SharePoint sites linked to a private or shared Teams Channels. When attempting to add content types with managed metadata columns, you may encounter an error message stating “Taxonomy disabled”.
To resolve this issue, you can enable the taxonomy feature with the ID 73ef14b1-13a9-416b-a9b5-ececa2b0604c using the PowerShell cmdlet Enable-PnPFeature before adding the content types to the sites with the template TEAMCHANNEL#1.
Script to check whether feature taxonomy is enabled Get-PnPFeature -Scope Site | Where-Object { $_.
read moreAutomate the Removal of Expired Sharing Links in SharePoint with PowerShell
Sharing is a great feature for collaboration. However, depending on how items, files, or folders are shared, a sharing link might be created or unique permissions on these items are created. It is possible to set an expiration date on sharing links in SharePoint and OneDrive. For more details, please refer to How to set an expiration date on sharing links in SharePoint and OneDrive. Microsoft introduced the capability to set an expiry date for all types of sharing links: “Anyone”, company-wide (aka.
read moreDeletion of company-wide and anonymous sharing links with PowerShell
Sharing is a powerful feature for collaboration. However depending on how items, files or folders are shared, a sharing link might be created or unique permissions on these items are created. The sharing link is created when the copy links is clicked from the sharing pop up options when people other those already have existing access are picked.
However by default, if sharing options have not been configured, links to “People in ” or “Anyone” (if external sharing is allowed) is selected
read moreOvercoming Limitations of SharePoint Sites Associated with Teams Private and Shared Channels: Tips and Hacks
Introduction Microsoft Teams offers private and shared channels as specialized collaboration spaces to cater to different organizational needs. While these channels provide enhanced security and collaboration features, they come with specific limitations and management challenges, particularly around the associated SharePoint sites.
This post covers some limitations, and management tips for SharePoint sites associated with private and shared channels, including PowerShell hacks and governance practices to overcome these challenges.
Managing SharePoint Sites for Private and Shared Channels SharePoint sites associated with private and shared channels are special types of sites with the limitations as identified by Gregory in his blog post Why you should never mess with Private and Shared Channel SharePoint Sites related to the inability to attach to a hub directly, being accessible from the Teams interface mainly, and inability to manage permissions at the site level, and with constrained external sharing.
read moreIdentifying Duplicate Microsoft 365 Group Names Using PowerShell
Introduction It is possible to create M365 Groups and Teams with the same name, and there is currently no built-in way to prevent this. The new Team/Site/M365 Group is created with a random number appended to the Team name for the SharePoint site and m365 Group email address.
Having duplicate names can cause confusion and increase risks, including:
Wrongly Granting Permissions: Users may accidentally grant permissions to the wrong M365 Group or Team, leading to unauthorized access.
read moreUpdate Teams Channel Tab display name using PnP PowerShell
Introduction Renaming the ‘Files’ tab in Microsoft Teams to something more meaningful for your business, such as “All Access,” can enhance user experience. It can help to differentiate other document libraries added as tabs. The Files has been renamed to Shared for chats to show all the files and links that were sent in the chat, making it easier to find them- all in one place. However, it is not possible to rename the Files and Posts tabs from the UI within channels.
read moreAdding M365 Group/Teams Owners and Members to SharePoint Group with PnP PowerShell
Introduction There are situations where you might want to reuse the M365 Group principals to assign permissions to other sites without creating additional Entra ID groups. This can be useful for:
Adding M365 group members to a SharePoint site, such as an intranet site for ‘Human Resources’ managed by the ‘Human Resources’ M365 Group/Teams or a hub site managed by a ‘Service Desk’ M365 Group/Teams. Adding M365 group members to custom or out-of-the-box SharePoint groups, such as adding particular M365 group owners or members to custom groups created for additional libraries within a different site.
read moreManaging Microsoft 365 Group Settings with PnP PowerShell and Microsoft Graph
Introduction Managing Microsoft 365 Group settings is crucial for maintaining a compliant and secure environment.PowerShell and Microsoft Graph can be used to configure various group settings, including naming policies, guest access, and more.
As a regular user of PnP PowerShell, I aimed to replicate the functionality of the Microsoft Entra cmdlets for configuring group settings using PnP PowerShell.
Example Script to Update naming policy Settings The following PowerShell script updates the naming group settings using the Microsoft Graph API and PnP PowerShell.
read moreAzure DevOps Spfx Deployment Workload Identity Federation
Introduction Thanks to Kinga Kazala for her timely article Deploy SPFx app using pipeline’s Workload Identity federation, which showcases how to use Workload Identity Federation to alleviate the need for using Entra app secrets or certificates. This method simplifies the setup process, especially when there’s reliance on a single person who might be unavailable.
We initially set up the SPFx pipeline for the Test environment using certificates with CLI for M365.
read moreViva 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.
read moreRestoring Previous Versions of Items in a SharePoint List Using PnP PowerShell
When working with SharePoint lists, there might be times when you need to restore items to a previous version. Whether it’s due to an error, unwanted changes, or simply needing to revert to an earlier state, SharePoint’s versioning feature is a lifesaver. I used the script to undo bulk changes made by a Power Automate flow after the process failed halfway due to some data needing correction. For data integrity, the bulk update needed to be undone before running the Power Automate flow again after the data corrections were made.
read moreGet Drive ID and Drive Item ID for File for Further Microsoft Graph Operations using PnP PowerShell
Introduction When working with files in SharePoint, the drive ID and drive item ID are essential parameters for further manipulation using Microsoft Graph API. The drive ID is a base64 encoded string composed of the site ID, web ID, and list ID for a particular SharePoint library. For more details, refer to Microsoft Graph: Encoding and decoding the drive ID by Mikael Svenson. The item ID part appears to be a base32 encoding of the SharePoint item’s unique ID, though the exact mechanics are still being explored.
read morePrevent Guests from Being Added to a Specific Microsoft 365 Group or Microsoft Teams team using PnP PowerShell
Introduction By default, guest access for Microsoft 365 groups is enabled within the tenant. This can be controlled either to allow or block guest access at the tenant level or for individual Microsoft 365 groups / Teams. For more information, check out Manage guest access in Microsoft 365 groups.
PowerShell Script to Prevent Guest Access Below is a PowerShell script that allows you to disable/enable guest access for specific Microsoft 365 groups.
read moreAutomate Renewal of Expiring M365 Groups Using PowerShell
Introduction Managing the lifecycle of Microsoft 365 Groups is important to prevent accidental deletion of M365 Groups. It is a good practice to set lifecycle expiration policy to control sprawl. However that means that the group will get automatically deleted after they expire. The Teams/M365 groups owners will get email notifications to renew within a certain timeframe , however if the owners missed the renewal notifications for different reasons, it may lead to accidental data loss.
read moreSwitching from Classic to New Designer in Power Automate
Introduction Have you ever encountered a stubborn Power Automate flow that won’t open in the new designer? For a long time, I stuck with the classic designer due to issues I faced with the new designer. However, I recently decided to make the switch for these reasons:
New Power Automate features will only be available in the new designer Microsoft will get rid of classic designer Future proof flows as they might not be editable if classic designer is gone unless Microsoft caters for incompatible action schemas In this blog post, I’ll share my experience and the steps I took to transition from the classic designer to the new designer in Power Automate.
read moreUpgrading SPFx to the Latest Version SPFx 1.20.0 - lessons learned
Introduction With the release of SPFx 1.20.0 in September 2024, I decided to upgrade an existing SPFx solution to the latest version following a post by Microsoft 365 & Power Platform Community on Linkedin This process can be challenging, especially when dealing with dependency version conflicts. In this blog post, I’ll walk you through the steps to upgrade your SPFx solution to version 1.20.0, including installing Node.js 18.18.0, using the CLI for Microsoft 365 to generate upgrade instructions, and addressing common issues.
read moreMicrosoft Teams - Teams icon missing in New chats & channels experience
Introduction If ever you had the chance to get your hands onto the New chats & channels experience, you may notice that the Teams icon is missing from the tray on the left To access the channels, it is an option within the chats.
Revert In case you find it confusing you can turn it off by following those steps
Click on the button Update, settings and more at the top of Teams
read moreFixing SPFx: Unable to Use the Latest Version in scaffolding project
Introduction The SharePoint Framework (SPFx) 1.20.0 has been generally available since September 2024. However, if you work with SPFx, you might encounter issues when trying to use the latest version. SPFx still requires Node.js 18.x.x. In this blog post, I’ll walk you through the steps I took to install Node.js 18.20.4 using NVM, install the SPFx toolchain, and troubleshoot an issue where the project scaffolding defaulted to an older version of SPFx.
read moreManage 'Everyone' and 'Everyone except external users' claim within a SharePoint site using PowerShell
Introduction As part of Microsoft 365 Copilot readiness, you may want to find where “Everyone and “Everyone except external users” claims are granted permissions which is a cause of oversharing. This blog post will guide you through using PowerShell to manage and audit the “Everyone” and “Everyone except external users” claims within your SharePoint site collection.
For more insights on why the “Everyone except external users” group is riskier than “People in your organization,” refer to Copilot for Microsoft 365 Data Ready – Where “Everyone except external users” group is more risky than “People in your organization” links!
read morePowerShell: Fetch Files with Retention or Sensitivity Labels in SharePoint Online
Introduction Understanding the sensitivity and retention labels applied to files in your SharePoint Online sites is essential for maintaining data security and compliance. These labels enable you to manage and protect your data by defining retention periods and handling sensitive information appropriately. This is particularly important for initiatives like the Microsoft 365 Copilot rollout, ensuring that the correct files are stored within the appropriate SharePoint sites. For example, if a SharePoint site is a public Team site, files labeled as confidential should be moved to a private Team site or existing Team site updated from public to private.
read morePnP Powershell GetPnPflow using asAdmin parameter
As part of the multi tenant app registration for PnP PowerShell deprecated on the 9th September 2024, we need to have our own app registration and grant the required permissions. Read more from Changes in PnP Management Shell registration in Microsoft 365
For the cmdlet Get-PnPFlow it requires permissions Azure: management.azure.com which is Azure Service Management
Simply adding the permission as it does not require admin consent and executing the cmdlet below yields no results
read moreSharePoint - working round restore a library link missing
Introduction Have you ever encountered the frustrating situation where the Restore a library link in SharePoint is missing or inconsistently available? This can be a significant issue when you need to restore a library urgently.
The Problem Typically, you would expect to see the link ‘Restore This Library’ in the SharePoint interface: Restore library
However, in some cases, this link might be missing:
Restore Library Missing
The Workaround After some investigation, I discovered a workaround.
read morePower Automate - Trigger a Flow from multiple Libraries and sites
Introduction In this blog post, we’ll explore how to trigger a single Power Automate flow from multiple SharePoint libraries and sites. This approach is particularly useful for scenarios where you need to standardize workflows across different document libraries and sites. It will avoid the need replicating the flows multiple times which may be harder to maintain and deploy.
The For a selected file action is used to achieve this. I have tried the Manually trigger a flowin vain as the context (site URL, library ID/name, and item ID) is not passed to the flow.
read moreAudit Service Principal Access to SharePoint Sites with Sites.Selected Permissions
Ensuring the security and compliance of your SharePoint environment is crucial, especially when dealing with service principals, Entra ID apps, or federated identities. These entities often have elevated permissions that, if mismanaged, can lead to unauthorized access and potential data breaches. Regularly auditing these permissions is a best practice for maintaining a secure and compliant SharePoint environment.
Application only or granular access to individual site instead of whole tenant, scope called “Sites.
read moreSharePoint Search for Documents: Modified Date and Title of Results
Introduction Have you ever encountered a situation where the search results in SharePoint show incorrect document titles and modified dates? This can be frustrating, especially when you rely on accurate metadata for document management. In this blog post, we’ll explore why this happens and how to resolve it.
Problem Statement A business user reported that the search results for a particular document displayed the wrong name and modified date. Upon investigation, we found that the title and modified date were being pulled from the document properties rather than the metadata shown in the SharePoint library.
read moreGet Library Drive Id using Power Automate
When using Power Automate with Excel for Business actions, the drive ID for a library is automatically determined. However, if you deploy a Power Automate solution across different environments and use a library as a datasource environment variable, referencing this variable in the flow can result in an error due to an invalid drive ID.
Referencing the variable in the Power Automate flow, it will throw an error message failing to work our the drive id of the library.
read moreRemove 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.
read moreEnhanced Version Controls/Intelligent Versioning Trim with PowerShell
Microsoft has introduced Enhanced Version Controls, previously known as Intelligent Versioning, as part of its public preview in May 2024. This feature, detailed in the Microsoft 365 Roadmap 145802, aims to help administrators manage file versions more effectively, reducing storage costs by removing unnecessary versions.
Extract from the Roadmap
We are introducing new version controls that help tenant and site admins or document library owners reduce the storage footprint driven by low value file versions.
read morePower Automate: Filter Array to Exclude First Approver from List of Approvers
Introduction In Power Automate, there are scenarios where a specific item needs to be excluded from an array to exclude. This blog post will guide you through the process of filtering an array to exclude the first approver from a list of approvers. This can be particularly useful in approval workflows where same person does not approve multiple stages.
Step-by-Step Guide Add Filter Array Action This action will allow filtering out the first approver from the list of approvers.
read morePower Automate: Using Arrays as Environment Variables
Introduction In Power Automate/Power Platform, environment variables within solutions are essential for managing and configuring flows across different environments. However, there is no direct way to declare an environment variable as an array. This blog post will cover how to use JSON to store arrays as environment variables, enabling you to manage complex data structures efficiently.
Available Environment Variable Types Power Automate offers various types of environment variables you can select and configure:
read morePower Automate: Get Page Author Details
Introduction In Power Automate, retrieving details about the author of a SharePoint page can be essential for various workflows. This blog post will guide you through the steps to get the page author details using Power Automate.
Add Send an Http request to SharePoint action and rename it to Get Page Author Details.Configure the action with the following settings: Site Address: triggerOutputs()?[‘body/SiteUrl’] Method: Get Uri : /_api/web/_api/Web/GetUserById(body(‘Parse_Page_Details_JSON’)?[’d’]?[‘AuthorId’]) Output of the API
read moreGet SharePoint site sharing Settings with PowerShell
Managing sharing settings for SharePoint sites is crucial for maintaining a secure and well-governed environment. With the help of PowerShell, administrators can efficiently retrieve and manage these settings across their SharePoint Online tenant. This ensures that sensitive information is not overshared and that your organisation’s data remains secure.
Importance of Reviewing Sharing Settings Reviewing sharing settings is essential to prevent oversharing, which can lead to data breaches and unauthorized access to sensitive information.
read moreEmpowering Secure Collaboration: Configuring SharePoint Tenant and Site Settings with PowerShell to prevent oversharing
Sharing lies at the heart of collaboration within SharePoint, facilitating seamless communication and teamwork. However, effective management of sharing settings is crucial to maintain data security and prevent unintended exposure. This is particularly important in light of tools like M365 Copilot.
An extract from Announcing SharePoint advanced management innovations for the AI and Copilot era
“With Copilot and AI, security has become a concern. Not because Copilot allows people to access anything more than they could previously; it just allows them to find information they have access to faster.
read moreDisplay instagram posts into SharePoint using Instagram Basic Display Independent Publisher Connector
How to Use the Instagram Basic Display Connector in Power Apps and Power Automate Instagram is a popular social media platform with over 1 billion monthly active users. It is a great platform for sharing photos and videos, and many businesses use it to promote their products and services. With the Instagram Basic Display (IndependentPublisher) connector, you can now easily retrieve data from Instagram accounts and use it in Power Apps and Power Automate.
read moreRefresh long-lived token via Instagram Graph API
Learn how to automatically refresh long-lived access tokens using the Instagram Graph API. Refer to how the Long-Lived Access Tokens for more info.
Long-lived tokens are valid for 60 days and can be refreshed as long as they are at least 24 hours old but have not expired, and the app user has granted your app the instagram_graph_user_profile permission. Refreshed tokens are valid for 60 days from the date at which they are refreshed.
read morePower Automate: Export Flow within solution as package (.zip)
I had a flow created in the default environment that needed to be moved into a solution in a managed environment. However, the export link for Package (.zip) was missing as the flow was within a default solution (preferred).
It was a huge flow, and manually recreating each action would have taken a considerable amount of time.
I checked another flow where the Package (.zip) was available.
Upon clicking the link, I noticed that /export was appended to the URL of the flow.
read morePowerShell: Removing Web API Permissions for SPFx Solutions used by EntraId SharePoint Online Web Client Extensibility
The script checks the ‘SharePoint Online Web Client Extensibility’ Principal within Entra ID for the actual assigned permissions as the SPFx solutions requests are all be added to that single shared permission group.
As hilghlighted by “Wes Hackett”:
I’ve personally seen plenty of tenants with Mailbox permissions with no corresponding solutions live in the app catalogs. Early SPFx doc examples encouraged the use of MS Graph into Mailbox permissions in one of the how to learn samples, older tenants sometimes have this breadcrumb left behind.
read moreRetrieve 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.
read moreUpdate managed metadata field using list formatting
Using column formatting in SharePoint, you can update the values of other fields using the setValue function. This approach allows you to create dynamic functionality in your lists and libraries without extensive development, helping to avoid accumulating technical debt.
Updating a Managed Metadata field, however, is not as straightforward as simply specifying the display value. The field expects a specific format that includes the term’s ID (termId).
Understanding Column Formatting Column formatting in SharePoint involves using a combination of inline CSS, HTML, and JSON to control how fields in lists and libraries are displayed.
read moreOptimizing PowerShell Scripts to check for unique permissions in SharePoint: REST API vs. Get-PnPListItem
When working with large SharePoint sites, checking for unique permissions can be a time-consuming task. This blog post explores methods to optimize PowerShell scripts for fetching property HasUniqueRoleAssignments to determine unique permissions, including using PnP PowerShell and the SharePoint REST API. We compare their performance and highlight the advantages and limitations of each approach.
Using PnP PowerShell PnP PowerShell provides an efficient way to interact with SharePoint Online and retrieve list items to check for unique permissions.
read moreCopy SharePoint list structure with data - ALM
If you have built Power Platform solutions using SharePoint as a datasource, you may want to export the list structure along with its data from the source environment (e.g., DEV) and deploy it across different environments such as Test, UAT, and PROD. Fortunately, the PnP Provisioning from PnP PowerShell provides this capability. Power Platform solutions can be deployed using pipelines after the SharePoint structure is deployed.
Export Structure and Data from SharePoint Lists PnP PowerShell makes this process straightforward with Get-PnPSiteTemplate:
read moreDelete M365 connected Team Site using PowerShell
If a M365 group connected Team site is deleted from SharePoint Admin Centre, from the UI it is not possible to delete the site from the deleted sites to be able to resuse the URL or name of the deleted site.
The end user is presented with the following prompt This site belongs to a Microsoft 365 group. Deleting the site will delete the group and all its resources, including the Outlook mailbox and calendar, and any Teams channels.
read morePower 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:
read moreTeams Chats - default Sharing Links to 'People Currently in this Chat
Have you ever wondered how to default the default sharing link in Teams chats to ‘People currently in this chat’? By default, if “Anyone” is disabled within the tenant, the sharing link is set to “People in my organization”. This can be a challenge when you want to limit access to only those in the current chat. All files uploaded to a Teams Chat are stored in the uploader’s OneDrive for Business.
read moreGetting Storage Metrics for a SharePoint site
Gaining an overview of what takes up space in a SharePoint site is crucial for monitoring large files or a significant number of versions.
Unfortunately, the storage metrics link, <siteurl>/_layouts/15/storman.aspx, won’t work for libraries with more than 5,000 files without nested folders. While this might go against information architecture principles, creating folders is an option to avoid the list view threshold error.
Here’s a PowerShell script to help you get storage metrics for your SharePoint site:
read moreSharePoint Highlighted Content Web Part versus News Web Part: Author versus Editor
The Highlighted Content Web Part and the News Web Part in SharePoint can be used to display news on a page. Both webparts serve different purposes and have distinct features. One particular difference is the display of author in News Webpart and display of editor in the Highlighted Content Web Part.
The Highlighted Content Web Part displays editing details like editor and last updated date with the news information. Unfortunately there is no option to change it to the author name.
read moreJSON Data Handling in Power Automate: Double Quotes
When using Power Automate action Send an Http request to SharePoint specially to send data in the body to a REST API call, for instance to create a news link from a SharePoint List Item, you might encounter issues if the body contains double quotes in the title or description. This blog post will walk you through the problem and provide solutions to handle double quotes in JSON strings.
Problem Overview Using the Send an Http request to SharePoint action to create a news link can fail if the JSON body contains double quotes.
read morePower Automate: Create and Publish a News Link
This post covers how to leverage SharePoint REST API to create and publish a news link from Power Automate using the Send an Http request to SharePoint action.
Within a Power Automate flow follow the steps below to create and publish a news link details.
Send an Http request to SharePoint action renamed to Get Page Details. Site Address : site url Method : GET Uri : /_api/web/lists/GetByTitle(‘Site%20Pages’)/items(10) Parse JSON renamed to Parse Page Details JSON Add the action Parse JSON and refer to the content from previous steps
read morePower 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:
read morePower 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.
read moreOversight of Sharing Information in SharePoint sites using PowerShell with CSOM, REST and PnP PowerShell
Effective oversight of sharing links and sharing information are paramount to ensuring data security, compliance, and optimal collaboration experiences.
As organisations migrate to M365 environments, they inherit powerful collaboration tools that facilitate seamless sharing of documents and resources. However, without proper governance, these capabilities can lead to unintended consequences such as data breaches, compliance violations, and loss of intellectual property.
Sharing is a powerful feature for collaboration. However depending on how items, files or folders are shared, a sharing link might be created or unique permissions on these items are created.
read morePower 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()`
read moreSharePoint Portals Site collections Inventory
As part of the M365 Copilot rollout , questions were raised on the /portals/Community and /portals/hub as both ‘Everyone Except External Users’ was granted access raising concerns on the content on the site. These are legacy sites and are currently inaccessible. Historically, these sites were accessible via the legacy SharePoint admin centre, however, they are not available through the modern SharePoint admin centre interface.
Thanks to Gregory Zelfond’s blog post What are all these site collections in SharePoint?
read moreSharePoint Storage Monitoring Against Allocated Quota using PowerShell
There is limited space allocated to the tenant. To ensure business continuity and smooth ongoing operation, it is imperative to keep an eye on its usage and take relevant actions suited to the circumstances. By default a SharePoint site is allocated 25 TB by default and OneDrive for Business site is allocated 1 TB by default. These settings can be amended manually to a different quota to control SharePoint site. The script will help to proactively monitor percent used against quota for each SharePoint site.
read moreUpdate A row action from Dataverse connector missing in Power Automate flow
Update A row action from Dataverse connector was not available to an older Power Automate.The requirement was to add ability to cancel an approval task created via action ‘Create Approval’ within 30 days as Power Automate flows timeout after 30 days. I noticed the action Update a Row in Selected Environment and decided to try it instead.
Unfortunately it threw the forbidden error for no apparent reason with no obvious permissions to grant.
read moreHow to Filter SharePoint Libraries to Return Less Than 5,000 Items
SharePoint Online has a list view threshold (LVT) of 5,000 items, which can cause performance issues if exceeded.
This post provides a workaround through filtering libraries/lists to stay within this limit and avoid common problems associated with large lists.
The Problem When a SharePoint library exceeds the 5,000-item threshold, various issues can arise. These include:
Inability to Browse Folders Navigating through folders becomes challenging and sometimes impossible through desktop office apps (Excel, Word,etc.
read moreExclude News Links from News WebPart in SharePoint Online
SharePoint Online offers the useful feature of news links to avoid duplication of news articles and promote existing posts across different sites. This is especially beneficial when news creation is enabled for various departments or directorates, allowing them to share significant news organization-wide.
However, the News WebPart might display both the news links and the original articles, resulting in duplicated content.
To manage this, you can utilize the OriginalSourceUrl column, which stores the link to the source news article.
read moreUpdate Choice values of List Items in SharePoint List
Maintaining up-to-date list items, especially when dealing with choice fields, can be a daunting task sepcially after choice field values are updated. We need a way to update these old values to the correct new ones.
The Challenge SharePoint lists use choice fields to categorise items. Over time, the need to update these choice values can arise, whether due to changes in terminology, business processes, or error correction. Manually updating these values across numerous list items is not only time-consuming but also prone to human error.
read moreOvercoming SharePoint's List View Threshold with CAML Queries in PowerShell
Overcoming SharePoint’s List View Threshold with CAML Queries in PowerShell Encountering the list view threshold error in SharePoint when dealing with lists exceeding 5,000 items is a common challenge. Using CAML queries within PowerShell scripts offers a server-side solution to efficiently filter and retrieve data, yet is prone to the list view threshold error.
Sample script This is the sample PowerShell script querying the specified SharePoint list using CAML query.
read moreFind orphaned choice values in SharePoint list/libraries using PowerShell
Find orphaned choice values in SharePoint list/libraries using PowerShell One common issue is orphaned choice values in SharePoint lists which may affect subsequent update to the list item. This can occur when list items contain values that are no longer valid according to the list’s choice field values. This post covers a PowerShell script to identify these orphaned choice values in SharePoint lists to either update them or add them back to the list of choice field values.
read morePower Automate copy actions across different environments
Power Automate copy actions across different environments If an action is copied from a different environment, the action is not avaible from the My Clipboard, if not you are presented with the following message only.
Save time and paste your most-used Flow code snippets here.
Select the ellipsis menu on any trigger or action, then choose Copy to my Clipboard.
Note: Pasted code clears each time you log out of Power Automate.
read moreUpdating SharePoint Site Logo and Thumbnail with PowerShell
Update SharePoint Site Logo and Thumbnail with PowerShell In SharePoint Online sites, the distinction between the Site Logo and Site Thumbnail is crucial. The site logo appears in the site header, while the site thumbnail is used in search results, site cards, file copying/moving, and other areas.
Both site logo and thumbnail are part of SharePoint branding. This post covers how to update the site logo and thumbnail across multiple SharePoint sites within a hub using PowerShell.
read moreUpdate Content Type of List Items in SharePoint List
Update Content Type of List Items in SharePoint List A content type in SharePoint is a reusable collection of metadata (columns) allowing to organise, manage and handle content in a consistent way. If the content type of files and items need to be updated because of required changes how particular content have to be managed, it can be a daunting laborious task if done manually. PowerShell can help automating the update of content types and corresponding metadata (columns).
read moreImporting Dates and Numbers from Excel file into SharePoint list with Power Automate
Importing Dates and Numbers from Excel file into SharePoint list with Power Automate Transferring data from Excel to SharePoint lists can encounter format issues, especially with datetime and number fields. This post covers solutions to some challenges particularly related to dates and numbers.
The flow is quite simple with an action to read contents from excel file and an action to create items into a sharepoint list.
Handling DateTime Fields When importing datetime data with the “List rows present in a table” action from the “Excel Online for Business” connector, you might encounter format related errors.
read moreTeamifying an Existing M365 Group with PowerShell
Teamifying an Existing M365 Group with PowerShell Within M365 , SharePoint and Teams together provides a rich collaboaration platform. When a team site is created from SharePoint admin centre, it is not associated with a Teams despite a M365 group is created in the background. To extend SharePoint collaboration features , there is a need to “teamify” an existing Microsoft 365 Group, essentially attaching a new Teams instance to it to allow use of channels and other apps.
read moreHandling Locked Office Files issue In Power Automate
Handling Locked Office Files issue In Power Automate Inspired by the workaround described by Pieter Veenstra System Updates in SharePoint from Power Automate using the ValidateUpdateListItem endpoint to help with the locked file issue, this post covers file version creation as well.
File Locked Issue File lock issues in Power Automate can occur due to:
The file being opened by a user. The file being updated by a Power Automate flow, which may take up to 6 minutes to release the lock.
read morePower Automate updating multi line field with more than 255 characters
Power Automate flow succeeded despite failure to update multi line text field within a SharePoint Library Updating multi-line text fields in a SharePoint Library from Power Automate flows, especially when the content exceeds 255 characters might fail if the field is not updated to allow unlimited length. This can cause workflows to fail silently.
In a recent scenario, an action was added to a Power Automate flow to update a SharePoint Library’s multi-line text field named ‘ErrorLog’ with error details captured during the flow’s execution.
read moreDateTime Handling in Power Automate
DateTime Handling in Power Automate Manipulating dates and times in Power Automate is a requirement at times. This post covers a few useful scenerios.
Add To Time For instance, adding a specific number of months to a date retrieved from an action using AddToTime function:
addToTime(body(‘Wait_for_an_approval_2’)?[‘completionDate’], int(body(‘Get_file_properties’)?[‘ReviewFrequency’]?[‘Value’]), ‘Month’, ‘dd/MM/yyyy HH:mm’)
Substract Time Specific number of months can be substracted from the date retrieved from an action
string(subtractFromTime(items(‘Apply_to_each’)?[‘DueDate’],1,‘Month’,‘dd/MM/yyyy HH:mm’))
Format Date Time Formatting date to a specific string format is essential otherwise update of data fields might fail because of culture differences.
read morePower Automate fix for InvalidTemplate: Unable to process template language expressions
Power Automate fix for InvalidTemplate: Unable to process template language expressions InvalidTemplate. Unable to process template language expressions in action can happen with actions within PowerAutomate. In my scenerio I added the encodian action ‘Convert_to_PDF’ and was resubmitting a flow for testing and kept getting the error message.
InvalidTemplate. Unable to process template language expressions in action ‘Convert_to_PDF’ inputs at line ‘0’ and column ‘0’: ‘The template language expression ‘json(decodeBase64(secrets(‘X-MS-APIM-Tokens’)))[’$connections’][‘shared_encodiandocumentmanager’][‘connectionId’]’ cannot be evaluated because property ‘shared_encodiandocumentmanager’ doesn’t exist, available properties are ‘shared_sharepointonline, shared_office365, shared_approvals, shared_teams_1’.
read morePublishing Major Versions of Files in SharePoint with Power Automate
Publishing Major Versions of Files in SharePoint with Power Automate This post covers how to publish major versions for Office documents (Word, Excel, or PowerPoint) in SharePoint using Power Automate, especially after an approval task using the checkin and publish REST endpoints. This applies to libraries having minor versions enabled
Just for context, a Power Automate approval flow with trigger for a selected file needed publishing for the selected file as major version after being approved.
read moreEnable Giscus for Hugo Blog
Enable Giscus for Hugo Blog I recently switched to Giscus for comments on my blog post, inspired by its popularity among other bloggers. Giscus, a commenting system powered by GitHub Discussions, offers a seamless way to engage with readers. If you’re using Hugo for your blog hosted on GitHub, linking Giscus to your posts is straightforward.
Note: The following setup guide is based on instructions generated by GitHub Copilot, which I successfully followed to integrate Giscus into my blog.
read moreGet Total Count of SharePoint Files, Folders, and Items with PnP PowerShell
Get Total Count of SharePoint Files, Folders, and Items with PnP PowerShell This PowerShell script powered by PnP PowerShell can help to get total count of files, folders, and list items across SharePoint tenant. This script is invaluable for administrators looking to perform audits, verify data migrations, or simply keep tabs on the content sprawl within their environments. The use case of this script was to get a total number of items that would be ingested into a third party application Records365 (provided by RecordPoint) to ensure the number tally for compliance purposes and identify any gaps.
read moreColumn Validation for Sort Code and Account Number in SharePoint
Column Validation for Sort Code and Account Number in SharePoint Column validation provides a solution to validate data for data integrity. This post covers column validation for Sort Code and Account Number in SharePoint.
Validation for Sort Code =AND(LEN([Sort Code])=6,ISNUMBER([Sort Code]+0))
The above formula checks
The length of the sort code must be exactly 6 digits. The sort code must be a number. Validation for Account Number =AND(LEN([Account Number])=8,ISNUMBER([Account Number]+0))
read moreHandling Special Characters within CSV with PowerShell using Encoding
When working with CSV files in PowerShell with special characters you might encounter an issue where special characters (e.g., em dashes —) are incorrectly represented as a question mark inside a diamond �. This common issue arises due to PowerShell’s default encoding not matching the encoding used in the CSV file.
Problem Statement The root of this problem lies in the encoding mismatch. Encoding is a method of converting characters into a format that can be easily stored or transmitted.
read moreFind SharePoint Framework (SPFx) Packages with PowerShell in Tenant and Site Collection App Catalogs
Find SharePoint Framework (SPFx) Packages with PowerShell in Tenant and Site Collection App Catalogs This post covers a PowerShell script to generate an inventory of SPFx installations within your SharePoint Online environment which will help you maintain oversight of your SPFx solutions, ensuring they are up-to-date and compliant. The script was particularly useful in pinpointing sites within the tenant where third-party applications, specifically an analytics SPFx component, were deployed. This was crucial for ensuring that data collection was confined to designated sites, such as the intranet in my case study.
read moreStreamlining SharePoint Template Usage: A Guide to Opening DOTX Files as DOCX
Streamlining SharePoint Template Usage: A Guide to Opening DOTX Files as DOCX Encountering issues with opening “.dotx” templates in SharePoint is a common scenario that can disrupt your workflow. Typically, when you attempt to open a “.dotx” file in SharePoint, it opens in edit mode for the template itself, rather than generating a new “.docx” document as expected. This behavior diverges from the experience in Windows File Explorer and can hinder productivity.
read moreEmpowering Secure Collaboration: Configuring OneDrive Tenant and Site Settings
Empowering Secure Collaboration: Configuring OneDrive Tenant Settings with PowerShell OneDrive makes it easy to collaborate by sharing files and folders with others. OneDrive is the storage space for personal productivity and not meant for collaboration. Data stored within OneDrive are
Files shared to chats within Teams Files shared with end user by other OneDrive users. OneNote Personal lists and Document storage Shortcuts to SharePoint sites/libraries Favourites Loops within chats Streams In this article, we’ll explore into how PowerShell can empower SharePoint administrators to configure OneDrive sharing settings proactively at the tenant level, addressing oversharing concerns for the M365 Copilot rollout.
read morePower Automate - Restore deleted flows
I accidentally deleted a power automate flow and needed a way of restoring it. I stumbled on Restore deleted flows to restore the deleted flows.
However the action List Flows as Admin (v2) was not returning all the flows, hence the deleted flow was missing. If it happens , enables the pagination setting of the action withing settings tab and set the threshold to ensure the number is more than number of flows you have in the environment.
read moreAzure DevOps Powerplatform Deployment error due to timing issue
If it takes too long to deploy the solution, time out issues might occur. In this instance consider checking and updating the MaxAsyncWaitTime. Its value has been increased to 120 which means the deployment process will wait up to 120 seconds (or 2 minutes) for asynchronous operations such as import power platform solution to complete fixing the timing out issue.
The fix is to amend the MaxAsyncWaitTime to 120
- task: PowerPlatformImportSolution@2 inputs: authenticationType: PowerPlatformSPN PowerPlatformSPN: 'powerplatform-t-connection' Environment: 'https://contoso-st.
read moreDeletion of sharing links with PowerShell
Deletion of sharing links with PowerShell As organisations look to deploy Copilot for Microsoft 365, ensuring the security and proper governance of shared content is important. The rollout of Copilot introduces advanced AI capabilities across Microsoft 365 apps using content from SharePoint/OneDrive, making it even more essential to manage sharing links judiciously to tackle the issue of oversharing.
Sharing is a powerful feature for collaboration. However depending on how items, files or folders are shared, a sharing link might be created or unique permissions on these items are created.
read moreManage SharePoint Premium - SharePoint Advanced Management Settings Using PowerShell to protect data in M365 Copilot Rollout
Manage SharePoint Premium - SharePoint Advanced Management Settings Using PowerShell to protect data in M365 Copilot Rollout SharePoint Premium - SharePoint Advanced Management offers features to help prevent data oversharing and accidental leaks, which is crucial for a successful rollout of M365 Copilot. This guide will show you how to manage these settings using PowerShell.
For an overview, read the Microsoft SharePoint Premium - SharePoint Advanced Management overview.
This post covers how to manage SharePoint Premium - SharePoint Advanced Management settings at both the tenant and site level using PowerShell.
read moreGuide to Preparing setting files for Power Platform managed solution deployment
Guide to Preparing setting files for Power Platform managed solution deployment This guide will walk you through the process of creating a settings file for Power Platform managed solution deployment. Refer to the posts for more details to set up Application Lifecycle Management (ALM) for power platform: Power Platform ALM & Pipelines w/ Matt Devaney and Converting to Modern YAML Pipeline: Application Lifecycle Management in Azure DevOps for Power Platform for detailed steps for ALM for power platform solutions.
read more