All Content
Timespan
explore our new search
Using parseJSON for SharePoint Row Level Security in Power Apps
Image Source: Shutterstock.com
Power Apps
Oct 19, 2022 8:42 PM

Using parseJSON for SharePoint Row Level Security in Power Apps

by HubSite 365 about David Wyatt

Senior Staff Engineer - Intelligent Automation Developer

Citizen DeveloperPower AutomatePower Apps

Unlock Row Level Security in SharePoint with Power Apps - Learn to use parseJSON for enhanced, cost-effective security solutions.

Power Apps and Its Role in Row Level Security

A lot of customers would consider SharePoint's row level security inadequate for use in Power Apps. Normally, SharePoint provides three standard levels of security; Full read & write, Full read only, and read & write rows created by you. But what if multiple groups, say a team or job role, needed to access specific rows? This would require the use of Dataverse, a powerful, albeit premium connector. While alternate solutions exist, their security is often questionable as they can be overridden by a tech-savvy user.

Nonetheless, there are solutions that maintain security and provide flexibility, such as using Power Automate to share each data row individually or making use of the new parseJSON function. This approach might be slightly complex to set up initially but is easier to maintain and provides the much-desired flexibility.

Before you start, you will need an environment with Dataverse, a solution containing apps and flows, and parseJSON enabled from Experimental Features. The idea is to use a Child Flow in the place of 'run only user'. This ensures smooth access to the SharePoint list and easy conversion of data back into array/collection using parseJSON.

The child flow processes the filter value and queries the list, returning an array which is then passed back as a string. Some flow modifications, such as changing the 'run only users' setting, will be necessary during this process. For instance, you need to set the SharePoint connector to use the flow owner's credentials. The next flow then passes the filter value to the Child Flow.

The Flow returns the SharePoint Get_Items JSON array. It allows two extraction options; using the standard 'response' function, which returns an array, or using the parseJSON function, which extracts a collection from a string. The parseJSON, however, operates on a nesting principle which demands a certain sequence to be followed.

Remarkably, you can use multiple accounts or security roles and convert strings back into arrays/collections easily. For more information, click here.

Power Apps and Its Functionality

Power Apps is an innovative tool for automating business tasks. Its functionality in handling SharePoint's Row Level Security demonstrates its scalability and adaptability in enhancing data security. When integrated with other Microsoft tools like Power Automate and parseJSON, the kind of effectiveness it brings about is profound and indispensable especially in this age of cyber threats.

Read the full article Power Apps – SharePoint Row Level Security (Using parseJSON)

Power Apps - Using parseJSON for SharePoint Row Level Security in Power Apps

Learn about Power Apps – SharePoint Row Level Security (Using parseJSON)

In the world of technology giants, Microsoft holds an eminent position with its various offerings, one of which is Power Apps. This resource assists in binding SharePoint with security on a granular level, a concept known as Row Level Security. Despite the numerous utilities of SharePoint in Power Apps, it lags in delivering this refined security. There are three types of access levels initially:

  • Full Read & Write,
  • Full Read Only, and
  • Read & Write rows that you have created.

Nevertheless, adversity faced during multiple people accessing specific rows (for a team or job role) is mastered by other alternatives like Dataverse, a premium connector, which is found to be robust but costly.

Security levels can be manipulated with a modified contribute role to prohibit user access via SharePoint. Yet the drawback arises from intrusion by a persistent user bypassing this setting via creating their application or Flow or employing the API.

Reprieve from this challenge lies in Power Automate, which provides two alternatives. First involves sharing each row individually (liable to the requirement of groups for manageability and unfit for intricate logic). The second way, albeit complex to institute but manageable to maintain, grants flexibility with logic.

Indispensable tools for this encompass an environment with Dataverse and a Solution containing your App and flows. The new parseJSON feature needs to be activated in Experimental Features, the availability of which may vary based on tenants.

Protocols are established with a Child Flow to circumvent 'run only user'. The owner of this flow can access the SharePoint list and pass the data back to the App. The App Flow, comparatively standard, is evoked by the software, which then submits the filter value to the Child Flow.

Subsequent to instituting filters and getting the SharePoint Get_Items JSON array, extraction can be done via either implementing a typical return or employing Response. Albeit proficient, it is categorized under a premium connector. The alternative lies in the parseJSON function, proficient in extracting a collection from a string.

The usage of parseJSON exhibits complexity owing to the nesting involved. Initially, the flow is called, post which the json string (jsonresult) is returned to parseJSON. For obtaining an array/collection, it needs to be converted into a Table first.

A shortcoming arises with parseJSON not categorizing each field type, yielding one 'Value' field. Utilization of Text(), Value(), and Boolean() is therefore needed to set the type of each Field. Adding new fields via AddColumns function is accomplished subsequently.

SharePoint lists are unique with Display Names and names, enabling column renaming without the necessity to update links. Text(), Value(), and Boolean() functions are deployed for String, number/integer, and boolean respectively in the given fields.

Thus, with the defined strategies and functions, two contrasting accounts/security roles can be operated. Furthermore, an effortless conversion of strings back to arrays/collections is possible in Power Apps.

More links on about Power Apps – SharePoint Row Level Security (Using parseJSON)

SharePoint Row Level Security (Using parseJSON)
Sep 21, 2022 — The Flow returns the SharePoint Get_Items JSON array, which looks like below. To extract this we have 2 options.
SharePoint Row Level Security (Using parseJSON)
Sep 23, 2022 — One of the biggest negatives for using SharePoint in Power Apps is the lack of row level security.
ParseJSON function in Power Apps - Power Platform
Jun 13, 2023 — The ParseJSON function will parse a valid JSON string and return an untyped object representing the JSON structure. The ParseJSON function ...

Keywords

Power Apps SharePoint, SharePoint Row Level Security, parseJSON in Power Apps, SharePoint power apps security, parseJSON SharePoint, SharePoint power apps parseJSON, SharePoint security using Power Apps, Power Apps Row Level Security SharePoint, Using parseJSON in SharePoint, Power Apps and SharePoint integration.