Skip to main content

Posts

Get old SharePoint Files using Power Automate efficiently

In this post, let us see how can we get the old files from a SharePoint Folder using Power Automate. In this example, I am considering a simple approach and this can be extended based on the requirement. To ensure the Power Automate is simple, efficient and the performance is optimized - we are not using ForEach control to loop through and identify old file or item.  We use " Send an HTTP request to SharePoint " in the Power Automate and query the data using OData filters and order by.  The idea here for the faster retrieval - selecting only a required set of fields from the file. Steps to achieve this: Login to https:make.powerautomate.com . New Cloud Flow -> Scheduled Or Instant (based on the requirement). (Configure the Start Date and Time. For repeat, every, configure the seconds/ minutes/  hours/ day/ week/ month) Click on Create Button. Click + icon to add new action. Search for SharePoint and select  " Send an HTTP request to SharePoint " Select the respec

Create an application user in Common Data Service/ D365/ Microsoft Dataverse

In this blog let us see Application Users in Microsoft Dataverse.  Microsoft introduced a concept called "Application Users" to connect to the D365 or Microsoft Dataverse from client application with better security and control over the access to the third parties. Before introducing "Application User", to connect Dynamics data we used to leverage licensed user account using Username and passwords. Refer the blow URL for details on the Application User setup and it's utilization. https://mspowerassist.blogspot.com/2021/05/how-to-connect-to-multi-factor-enabled.html

How to Connect to Multi-Factor Enabled Microsoft Dataverse using C# (V9.2)

As per Microsoft,  the  WS-Trust  authentication type that is used by custom clients to connect to Dataverse is deprecated. This change applicable to the client applications which tries to connect to Microsoft Dataverse. This helps developers to connect to Microsoft Dataverse with more security and protect access to the application as per the business requirement. So, in order to connect to Microsoft Dataverse, we can leverage Azure Active Directory. Microsoft Reference on the WS-Trust authentication Type Changes Pre-requisites: App Registration in Azure Portal . Create an Application User in Dataverse. Consume the Application Registration details in Console Application Application Registration in Azure Portal: Log in to Azure Portal Go to "Azure Active Directory" --> "App registrations" --> New registration Provide a Name, Choose respective "Supported account types" (first option would work for the users in same tenant) Click on "Register"

How to create a Folder in OneDriveforBusiness

In this post let us see "How can we create an Empty Folder in OneDriveforBusiness" using SharePoint HTTP Action. As we do not have out of the box action to create Folders in OneDriveforBusiness - we can leverage "Send  an HTTP request to SharePoint" Pre-requisites: OneDriveforBusiness URL Folder Name to create Eg: https://{domain}-my.sharepoint.com/personal/{username}/_layouts/15/onedrive.aspx Steps: Go to  Microsoft Power Automate | Microsoft Power Platform  -> Sign in Select the respective Environment Click on "Create" -> Instant Flow -> provide a name to the flow name choose "Manually trigger a flow" Add an input to the trigger and name it as "folderName" Add an action -> "Send an HTTP request to SharePoint" Click on "Add a custom item" and enter the OneDriveforBusiness URL and update the action with below parameters

How to embed an image in an email | Power Automate

In this post let us how to embed an image in an email using Power Automate In order to embed an image in an email - it would be easy if the image is stored in OneDrive or SharePoint folder and retrieve them. Let us see how to accomplish this... Create a folder in OneDrive for Business Upload an image to embed in email Now, let us create flow. Add a trigger Add a variable (this helps us to form the image tag to embed in email) Add OneDrive for Business connector and chose "List files in folder" Add "Get file content" and File field add - "Id" from the above action Now add "Get File Content" action from OneDrive for Business connector Under File field - select "Id" from the dynamic content Apply to each automatically applies when you add "Id" into File field. Now add "Set Variable" and update it's Value as <img src="data:image/png;base64, @{body('Get_file_content')?['$content']} " alt=&