When working with SharePoint you might have a situation in which you’ve assigned permissions to another user. But what if you want to reset this change using a Power Automate flow?
You could remove the permissions on the object with the build in Power Automate “Stop sharing an item or file” function. But if you do this all permissions of the item will be gone.
What we want is for the object to inherit the permissions of its parent. There is (as far as I’ve seen) no Power Automate function which allows us to do this. In the SharePoint API there is a function called ‘ResetRoleInheritance’ which does exactly what we want.
So what we can do is make a POST to the SharePoint API:
After running above command you will notice that the permissions of the item wil now no longer be unique and match the permissions of the list or parent.
There is a caveat. The above call will have an error if the item does not have unique permissions.
To avoid this we should verify first that the item is indeed using unique permissions. Once again we will need to use a function of the SharePoint api. Here we will call the ‘HasUniqueRoleAssignments’ function.
Ever since I started working I’ve had a Mac for personal use. My first job had me working on (broken) Windows machines which had to be repaired. I just wanted something else to look at after business hours, so I ended up with a my first Mac, a Mac Mini with a PowerPC G4 CPU.
Many years have passed since and I still have a Mac, currently a 2017 model Macbook Pro with an intel CPU.
Last year Apple introduced the M1 chip. Many reviewers have been boasting about its amazing performance. What I find even more amazing is that these machines require a lot less cooling than their Intel predecessors. So much power, so little noise. The Macbook Air doesn’t even have a fan any more. If only OEM-partners of Microsoft offered ARM-based devices of similar performance…
With the recent macOS Monterey update us Intel users are graced with a new feature in the settings menu. We now have a battery panel which has an option to put the machine in a low power mode. Since enabling this mode I no longer have had fans spinning like a jet whilst toking light/medium duty tasks.
If you want the same feature on an older version of macOS or you want more control on power consumption per application then you might want to check out Turbo Boost switcher.
Whilst playing with Xamarin I encountered an issue when debugging the Android version of the app. Apparently localhost is not translated causing an error when trying to access an API running on my development machine. Strangely I did not encounter this issue when debugging the IOS version of my app.
To access your localhost (aka your development machine) you need to refer to the IP-address 10.0.2.2.
To work around this issue you can use the DeviceInfo class from Xamarin.Essentials. Just add a statement which checks the type of device the code is being ran on.