Search Results

13 results found

Blog Posts (11)

  • How to remove a user sharing permission from a SharePoint Library folder?

    By default SharePoint list and libraries inherit permissions from parent site. You can break the inheritance and create unique permissions on a particular list or library. Suppose you have a document library with multiple folders or files where you need to share specified files or folders to a particular user. In these scenario you need break the inheritance and use the share option to give permission to that particular user. In this article I will explain how to remove a user sharing permission from a specified SharePoint library folder using Power Automate ( Background I have a document library named 'TestAjDocLib' and a folder called 'A1'. Custom permissions are set for this document library. Folder 'A1' is shared with a particular user. I want to remove this users shared permission from folder 'A1'. Power Automate Build There are no out of the box SharePoint connectors to do this job using Power Automate. The only option we have is to use the REST API method. _api/web/GetFolderByServerRelativeUrl('TestAjDocLib/A1')/ListItemAllFields/RoleAssignments/GetByPrincipalId({User_Id'}) First we need to find the user principal id then execute the http DELETE post using the above SharePoint REST API. To find the user principal id here I am using the user email address. Steps REST API to get user principal id: _api/web/siteusers/getbyEmail('') Next we need to use Parse JSON action step to extract the user principal id. Following is the JSON schema I used above. { "type": "object", "properties": { "d": { "type": "object", "properties": { "__metadata": { "type": "object", "properties": { "id": { "type": "string" }, "uri": { "type": "string" }, "type": { "type": "string" } } }, "Alerts": { "type": "object", "properties": { "__deferred": { "type": "object", "properties": { "uri": { "type": "string" } } } } }, "Groups": { "type": "object", "properties": { "__deferred": { "type": "object", "properties": { "uri": { "type": "string" } } } } }, "Id": { "type": "integer" }, "IsHiddenInUI": { "type": "boolean" }, "LoginName": { "type": "string" }, "Title": { "type": "string" }, "PrincipalType": { "type": "integer" }, "Email": { "type": "string" }, "Expiration": { "type": "string" }, "IsEmailAuthenticationGuestUser": { "type": "boolean" }, "IsShareByEmailGuestUser": { "type": "boolean" }, "IsSiteAdmin": { "type": "boolean" }, "UserId": { "type": "object", "properties": { "__metadata": { "type": "object", "properties": { "type": { "type": "string" } } }, "NameId": { "type": "string" }, "NameIdIssuer": { "type": "string" } } }, "UserPrincipalName": { "type": "string" } } } } } Finally use the below REST API step to remove the user permission from a particular folder. Using the above method we can remove the users custom permission from a custom folder using Power Automate (aka Microsoft Flow). Thanks for reading my post.

  • How to retrieve CDS Option Set Label Name?

    This is something often mentioned in Power Automate community about how to retrieve the option set label name? There are different ways you can retrieve this. It's all depends on the connector you using in your Power Automate Step. When you create an Option set it allow you to include drop down lists of fixed values to a user within your app to ensure data consistency. Behind the scene it stores the name and a numeric value. Power Automate actions steps such as Get or List records retrieve the option set numeric values. Here are the ways you could retrieve the option set label name. There are two types of CDS connectors available in Power Automate. (a) Common Data Service (b) Common Data Service (Default Environment) There are differences between these connectors. If you using Common Data Service Connector you can directly get the option set name from List or Get Record. By default dynamic property shows the option set value only. See below in my example Type (Option Set) shows the dynamic property as Type Value which is the numeric value stored under the database. Label names are not shown under the Dynamic content. If you check your runtime history of flow Power Automate step Get or List action, here you can see the label names are retrieved. You can use the expression to retrieve this If you using the List action then you can declare a compose action step, click the expression and type the following: items('Apply_to_each')?['_ajb_type_label'] Using the the above technique you can retrieve the option set label names. The same technique works with D365 connector as well. The above technique won't work with Common Data Service (Default Environment) Connector. It only retrieves the Option Set numeric values. So how do we retrieve the label names for default environment connector? CDS stores the option set details (Label Name & Value) under a system entity called StringMaps. This entity is not accessible via CDS entity interface (PowerApps > Data > Entities) but available via Power Automate action steps. To retrieve the option set label name you need to know couple of things before hand. Entity name where lookup is defined, lookup attribute name and value of the attribute (numeric value) Execute the above list record which will retrieve the label name 'Value'. See below. Thanks for reading my blog.

  • The Compose action

    Microsoft Power Automate (aka Microsoft Flow) provides lots of action steps out of the box. My favourite one is Compose. What does it do? What is the Compose action? The Compose action is like a static variable. It can be placed anywhere within your flow, and its value can be accessed from anywhere within the flow. The value is persistent – once it is set it cannot be changed. The value of the Compose action can be the result of an expression, or be a ‘regular’ value that you assign yourself (e.g. a string, integer etc). How we can use the Compose action Example #1 This action will output today’s date. The expression I am using as the input is: formatDateTime(utcNow(),'dd-MM-yyyy'). If we run this, we will see: Example #2 Now let us try using a Compose action inside of a loop. First we declare a new Compose action (Compose 2) using the expression addDays(utcNow(), 1, 'dd-MM-yyyy'). This will output tomorrow’s date. Next we also declare a Boolean variable (named Stop) to stop the loop after one iteration. Our flow now looks like this: Running it gives us this output: Example #3 Now we will extend our flow to use the output of both Compose actions. Note how one Compose action is inside of the Do-while loop, and one is outside. The output of either one can be accessed from anywhere in our flow. Please note how the Compose 3 action (outside of the loop) is set to the output of Compose 2 (which is inside of the loop)! Here is the output of the completed flow:

View All

Pages (2)

  • ABOUT | Power Platform | Power Automate | Microsoft Flow

    ABOUT Who I am Hello, my name is Ajith Madathil. I have been fortunate to work with Microsoft technologies for many years now, going all the way back to MS-DOS, Windows 3.1, through the .net Framework, Power Platform, C# and onwards. Currently I am working with Power Automate, Power Apps, D365 CE, SharePoint & Microsoft Azure. ​ In October 2019 I was awarded the title of 'Power Automate community super user' (AKA a Flownaut) for my contributions to the Power Automate community forum by Microsoft. My Power Automate community profile name is 'abm'. ​ My Profile Page ​ Power Automate - Super User Announcement ​ Power Automate Community: ​ My Twitter handle: @mydevexperience Why do I do this? ​ "When one teaches, two learn" - Robert A. Heinlein ​ I am a big believer in sharing knowledge. So far I have authored more than solutions for the Power Automate community forum. At the same time I have learned a lot from the community as well. 300 ​ What I can do for you ​ I can help you to automate a business process using Power Platform. If you looking for any training (Individual/Group) or consultancy in Power Platform (Power Automate / PowerApps), D365 & SharePoint, then please get in touch with me. ​ Contact me via email please click here ​ Contact me via Power Automate @abm

  • BLOG | Power Platform | Power Automate | Microsoft Flow | Power Apps

    Blog Categories ​ Beginner Intermediate Advanced ​ Power Automate Essentials ​ ​ ​ ​ ​ ​ How can I help you? ​ I am happy to help at any time. You can contact me via the official . Tag me (@abm) on any post you make there if you would like to me take a look at it. PowerAutomate community forum ​ I am always available for both corporate training or 1-2-1 training for individuals. Contact Me

View All