0

Can I use JSON column format to hide show power automate button in a SharePoint list depending if the user is an admin or not.

I don't want people with read only access to trigger the flow.

1 Answer 1

1

SharePoint JSON formatting does not support checking site/list permissions officially.

However, below JSON formatting works to check if user has read or 'more than read' permissions:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "style": {
    "visibility": "=if([$PermMask]>='0xb00','hidden','visible')"
  },
  "txtContent": "=if([$PermMask]>='0xb00','Read-only','More than read')"
}

So, you can change the visibility of power automate button element in JSON based on [$PermMask] as shown above.

1
  • 1
    Thanks Ganesh.Will give this a shot and let you know
    – naijacoder
    Nov 9, 2022 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.