Delete a file or folder with Graph API

Ever needed to programmatically delete files or folders from SharePoint? Whether you’re enforcing data retention policies, cleaning up processed files, or simply keeping your document libraries tidy, the Microsoft Graph API combined with Power Automate makes it straightforward. In this post, I’ll walk you through every step — from obtaining the right IDs to making the DELETE call. Why Automate File Deletion? There are several reasons why one might want to delete a SharePoint file or folder via the Graph API using Power Automate. Firstly, automating deletion can help maintain the organization and cleanliness of a SharePoint site, especially when dealing with temporary or obsolete files. Secondly, it allows for the enforcement of data retention policies by programmatically removing files that are past their retention period. Thirdly, it can be used to streamline workflows by deleting files that have been processed, reducing clutter and potential confusion. ...

4 June 2024 · 5 min · DamoBird365

Azure App Expiry Monitoring with Power Automate & Graph API

Have you ever had a service go down because an Azure App Registration secret expired without anyone noticing? Client secrets and key certificates come with expiration dates, and failing to renew them in time can lead to service disruptions and security vulnerabilities. In this post, I’ll walk you through a super efficient Power Automate flow that monitors your Azure App Registrations for expiring keys using the Graph API and XPath — without the nested loops and API overhead that most solutions rely on. ...

31 August 2023 · 9 min · DamoBird365