Skip to main content

Posts

Showing posts from 2025

Timeout for Power Automate Desktop Flows

In Power Automate Desktop (PAD) there’s no built-in “auto-kill after X minutes” setting, so you have to enforce the 10-minute limit yourself. Here are the three reliable ways , from best practice to more advanced. Best practice: Control it from a Cloud Flow (recommended) This is the cleanest and safest approach. How it works A Cloud flow starts the Desktop flow You set a timeout of 10 minutes If the desktop flow runs longer → it gets terminated automatically Steps Create a Cloud flow Add action: Run a flow built with Power Automate for desktop Click … (three dots) on the action → Settings Set Timeout to: PT10M Enable Run in unattended mode if needed Save If the desktop flow exceeds 10 minutes, Power Automate will force stop it Pros Official, supported No hacks Best for production Option 2: Build a timeout watchdog inside the Desktop Flow Use this if you must run PAD standalone. Basic logic At the start of the flow , store the cur...

Get Search Crawl Log using PowerShell in SharePoint Online

At times, you may have to check the search crawl logs if search results don’t return results from specific content. Search crawl logs can be obtained from the search service application in the SharePoint on-premises environment. However, to inspect the search crawl log in SharePoint Online, you must use  Get-PnPSearchCrawlLog  cmdlet. Make sure you have access to the Crawl Log before you execute any of these PowerShell scripts! Login to SharePoint Online Admin Center  https://tenant-admin.sharepoint.com Click on “More Features” from the left navigation >> Click on the “Open” button under the Search. On the Search Service Application page, click on the “Crawl Log Permissions” link at the bottom >> Enter the user names whom you want to grant search crawl log permissions and click on “OK” to save your changes. Register an App in Entra ID (Azure AD) Step 1: Register an App in Entra ID (Azure AD) Go to: https://entra.microsoft.com Navigate to:  Home ...

Key Limitations of Microsoft Power Automate (as of August 2025)

Microsoft Power Automate is a powerful tool for automating business processes, but like any platform, it comes with a set of limitations. Understanding these constraints is essential to designing efficient, scalable, and compliant workflows—especially as your automation strategy grows in complexity.  Here are the most important limits you need to know:  1. Switch Cases Each Switch action supports a maximum of 25 cases. If you need more, consider using nested Switches or alternate logic like parallel branches or conditionals.  2. Actions per Workflow A single flow can contain up to 500 actions. For complex workflows, you may need to split logic into separate flows or use child flows to stay within this limit.  3. Nesting Depth You can nest actions (e.g., conditionals or loops) up to 8 levels deep. Going beyond this will result in a design error.  4. Variables per Flow Each flow can define up to 250 variables. This includes all variable types (string, inte...

💡 Must-Know PowerApps Functions for Building Powerful Apps

Microsoft PowerApps enables users to build custom business apps with minimal code. One of its core strengths is the rich set of built-in functions that can handle logic, data, user input, and more. Whether you’re a beginner or an experienced app maker, these functions are essential for building flexible, user-friendly applications. In this post, we’ve grouped the most useful PowerApps functions into categories, so you can quickly find what you need for any scenario. 🔁 Logic & Conditional Functions These functions control decision-making within your app. If(condition, trueResult, falseResult) – Basic IF logic. Switch(expression, case1, result1, ..., defaultResult) – Simplifies multiple conditional paths. IsBlank(value) – Checks if a field or variable is empty. Coalesce(value1, value2, ...) – Returns the first non-blank value in a list. Not(condition) – Inverts a Boolean value (true → false and vice versa). 🔤 Text Functions Work with strings, user input, and formatted data. Concate...

🚀 Essential SPFx (SharePoint Framework) Commands for Every Developer

Whether you're new to SharePoint Framework (SPFx) or a seasoned pro, having a go-to list of core commands can significantly improve your development workflow. In this post, we'll walk through the most important SPFx CLI commands—from setting up your environment to packaging and deploying your solution. 🛠️ Setting Up Your SPFx Project Start by scaffolding a new project using the Yeoman generator provided by Microsoft. Make sure Node.js and npm are installed before you proceed. yo @microsoft/sharepoint After scaffolding the project, install all dependencies: npm install To update dependencies later: npm update 🔐 Trusting the Development Certificate If you're using the local workbench, you need to trust the developer certificate for HTTPS support: gulp trust-dev-cert 🧪 Running the Local Workbench To build and serve your project locally, use: gulp serve This command starts a local server at: https://localhost:4321/temp/workbench.html You can also test your solution in ShareP...

🚀 Mastering Pagination in Power Apps: Handle Large Data Efficiently!

📌 What is Pagination in Power Apps? Pagination in Power Apps is a method used to display large datasets in smaller, manageable chunks (pages) instead of loading everything at once. This improves app performance, avoids delegation issues, and enhances the user experience. 🔹 Why is Pagination Needed in Power Apps? Power Apps has a delegation limit when working with data sources like SharePoint, SQL, and Dataverse. By default, it can retrieve only 500 records, and the maximum limit is 2000 records. If your dataset has thousands of records, trying to load everything at once will:  ❌ Slow down the app  ❌ Cause delegation warnings  ❌ Fail to retrieve all data ✅ Solution:  Use Pagination Instead of loading everything, fetch only a specific number of records at a time (e.g., 50 per page) and let the user navigate between pages. Example: Employee Directory App (SharePoint List) 🔹 Suppose you are creating an Employee Directory App that fetches employee details from a ShareP...

How to List All SharePoint Lists with PowerShell Using PnP

When managing SharePoint Online, administrators often need to retrieve a list of all libraries and lists in a site. With the PowerShell PnP module, this process is quick and efficient. In this post, we’ll walk through a simple script that connects to a SharePoint site and retrieves the title and description of all lists. Prerequisites To follow along, make sure you have the PnP PowerShell module installed. You can install it using: Install-Module -Name PnP.PowerShell Script Overview Here's the script that connects to your SharePoint Online site and displays the title and description of each list: # Connect to SharePoint site Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/yoursite" -Interactive # Get all lists $lists = Get-PnPList # Select and display Title and Description $lists | Select-Object Title, Description | Format-Table -AutoSize Use Cases Auditing site contents Documenting SharePoint structure Identifying unused or unnamed lists

PowerShell Script to Bulk Update "Next Review Date" for PDFs in SharePoint Online

  In document management scenarios, it's common to have review schedules for files such as policies, SOPs, or manuals. This blog post walks you through a PowerShell script that automates the process of updating the  “Next Review Date”  field for all  PDF documents  in a SharePoint Online document library. We’ll use the  PnP PowerShell  module to fetch and update items efficiently, while also handling time zone specifics like  CST/CDT . Prerequisites Before running the script, ensure: You have the  PnP PowerShell  module installed: Install-Module PnP.PowerShell -Scope CurrentUser You have the correct  Site Collection URL  and  Library Internal Field Name . Your account has permission to modify list items in the target document library. What the Script Does 1. Connects to SharePoint Online using PnP PowerShell. 2. Filters all PDF documents in the specified library. 3. Calculates a future "Next Review Date" (e.g., 9999-09-09)...

Convert IST to CST/CDT in PowerShell – Handling Daylight Saving Time (DST)

Working across time zones can be tricky, especially when Daylight Saving Time (DST) is involved. If you’re dealing with automation, scheduling, or data transformation tasks, converting between Indian Standard Time (IST) and Central Time (CST/CDT) becomes essential. In this post, I’ll walk you through a PowerShell function that smartly handles the conversion of an IST datetime to either CST (Central Standard Time) or CDT (Central Daylight Time), depending on the date and DST rules. The PowerShell Function Below is a reusable PowerShell function that converts IST to CST/CDT accurately by accounting for Daylight Saving Time. function Convert-ISTToCSTorDST {     param (         [datetime]$ISTDate    # Input IST DateTime to be converted     )     # Central Time Zone Information     $centralTimeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById("Central Standard Time")          # Check if the g...

Bulk Import Excel Data to SharePoint List Using PowerShell and PnP

  Managing large datasets in SharePoint can be tricky, especially when you're dealing with Excel files and need to avoid list view threshold issues. In this guide, I’ll walk you through a PowerShell script that efficiently imports data from Excel into a SharePoint Online list using PnP PowerShell — with batching support for performance. Prerequisites Make sure you have the following before running the script: SharePoint Online site URL Excel file with data properly formatted PnP PowerShell module installed ( Install-Module PnP.PowerShell ) Appropriate SharePoint permissions What the Script Does Connects to your SharePoint site Loads and reads an Excel file Converts Excel date values Batches records in groups (to avoid the 5000 item threshold) Adds the items to your SharePoint list or library Logs execution time PowerShell Script $siteUrl = "[Site Collection URL]" Connect-PnPOnline -Url $siteUrl -UseWebLogin # Capture the start time $startTime...

How to Split a Large Excel File into Smaller Chunks Using PowerShell

Working with massive Excel files can be cumbersome—slow to open, hard to process, and error-prone in automation. If you’re dealing with a large dataset and need to split it into smaller, manageable files, PowerShell offers a powerful and efficient way to do it—especially with the help of the ImportExcel module. In this guide, I’ll walk you through a simple script that takes a large Excel file and splits it into multiple smaller Excel files, each containing a defined number of records. Requirements PowerShell ImportExcel module You can install it via PowerShell with:              Install-Module -Name ImportExcel # Import the ImportExcel module Import-Module ImportExcel # Path to the large Excel file $excelFilePath = "[LocalFilePathwithFileExtention]" # Define the chunk size (e.g., 10,000 records per chunk) $chunkSize = 10000 # Read the Excel file $excelData = Import-Excel -Path $excelFilePath # Calculate how many chunks are needed $totalRo...

Import Sharepoint List data with PnP Powershell from excel

  $siteUrl = "[SiteURL]" $listName = "[List NAME]" $excelFilePath = "C:\Users\user254\Downloads\ObservationsImport1.xlsx"  $lookupColumns = @{     "Location_ID" = "WS_Locations"     "Line_ID" = "WS_Line"     "Area_ID" = "WS_Area"     "Sub_Area_ID" = "WS_Sub_Area"     "Category_ID" = "WS_Category"     "Sub_Category_ID" = "WS_Sub_Category" } $nonLookupColumns = @("OBSERVATION_DATE", "SHIFT", "TYPE", "BEHAVIOR", "AT_RISK_BY_UNSAFE_COND", "COMMENTS", "TIME_ZONE", "ROLE") Connect-PnPOnline -Url $siteUrl -UseWebLogin $excelData = Import-Excel -Path $excelFilePath $excelData.Count $lookupDataCache = @{} function Get-LookupId {     param (         [string]$lookupColumn,         [string]$lookupValue     )     $itemId=0                    $lookupListName = $lookupColumn...

How to Duplicate a SharePoint List Using PnP PowerShell

When working with SharePoint, you might find yourself in situations where you need to create a duplicate of an existing list. This could be for backup purposes, testing, or simply as a template for new content. Fortunately, using PnP PowerShell , you can automate this process in just a few easy steps. In this blog post, I'll walk you through how to create a duplicate of a SharePoint list, including its structure and items, using a simple PowerShell script with PnP PowerShell commands. What is PnP PowerShell? PnP PowerShell is a powerful library of cmdlets that helps you interact with SharePoint and Office 365. It allows you to manage SharePoint Online or SharePoint Server environments from the command line, automating common tasks and simplifying your SharePoint administration. Prerequisites: Before we dive into the script, make sure you have the following: PnP PowerShell module installed . If you haven't installed it yet, you can do so by running this command: Install-Module -...

Automating SharePoint List Updates with PnP PowerShell and Excel Integration

In this post, we will walk through a PowerShell script that automates updating SharePoint list items using PnP PowerShell commands, including reading data from an Excel file to add new items to a secondary SharePoint list. This is useful for syncing or updating information across SharePoint lists, saving time and reducing manual effort. Prerequisites Before diving into the script, ensure you have the following: PnP PowerShell Module : You can install this via PowerShell by running Install-Module -Name "PnP.PowerShell" -Force -AllowClobber . Access to SharePoint Online Site : Ensure you have the necessary permissions to read and update SharePoint lists. Excel File : An Excel file with the data you want to import into the SharePoint list. The script uses the Import-Excel command, which requires the ImportExcel PowerShell module. You can install it using Install-Module -Name ImportExcel . Script Overview This script connects to a SharePoint Online site, retrieves items from a ...

Clear Approval History from Data verse Approval table

To Automate Delete Approval history we need to delete the records data from Approval History Data verse table. To Delete Approvals History there are 2 approaches 1.     1. Using Data verse Actions in Power automate which is premium connector. 1.     2. Using HTTP Action in Flow which is also a premium connector. Using Data Verse Connector Step 1:  Step 2: