cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sindhureddy
Helper III
Helper III

How to pass json output values to http request to remove permissions

Hi,

I am trying to change the permission of particular column in item (which is multi- select people field). So I used get items to get tha users present in that column and used join function. Then I got the IDs of that users using rest api and finally parse json output is like 

 "results": [ 13, 38 ]

Now when am trying to pass this values to remove permissions by taking results of parse json and pass inside principal values it's not working. Can anyone help me with this .

_api/web/lists/getByTitle('DeliverableVersions_1')/items(@{items('Apply_to_each')?['ID']})/roleassignments/removeroleassignment(principalid='')

1 ACCEPTED SOLUTION

Accepted Solutions

yeah, I think I found solution I need to give item() using expression inside formula.
Capture3.PNG
Thanks for the reply @abm 

 

View solution in original post

6 REPLIES 6
abm
Super User
Super User

Hi @sindhureddy 

 

Are you getting any error?  What do you meant by its not working?

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
abm
Super User
Super User

Hi @sindhureddy 

 

Have a look on this thread

 

Solved: Change Permissions for SharePoint List item on New... - Power Platform Community (microsoft....

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

HI @abm 
Thanks for the reply. Below is the input am giving in http request which says not in correct format. I took compose because its inside apply to each as am not able to take initializing variable inside loop. 

Schema in json is:

{

    "type""object",

    "properties": {

        "d": {

            "type""object",

            "properties": {

                "__metadata": {

                    "type""object",

                    "properties": {

                        "id": {

                            "type""string"

                        },

                        "uri": {

                            "type""string"

                        },

                        "etag": {

                            "type""string"

                        },

                        "type": {

                            "type""string"

                        }

                    }

                },

                "FirstUniqueAncestorSecurableObject": {

                    "type""object",

                    "properties": {

                        "__deferred": {

                            "type""object",

                            "properties": {

                                "uri": {

                                    "type""string"

                                }

                            }

                        }

                    }

                },

                "RoleAssignments": {

                    "type""object",

                    "properties": {

                        "__deferred": {

                            "type""object",

                            "properties": {

                                "uri": {

                                    "type""string"

                                }

                            }

                        }

                    }

                },

                "AttachmentFiles": {

                    "type""object",

                    "properties": {

                        "__deferred": {

                            "type""object",

                            "properties": {

                                "uri": {

                                    "type""string"

                                }

                            }

                        }

                    }

                },

                "ContentType": {

                    "type""object",

                    "properties": {

                        "__deferred": {

                            "type""object",

                            "properties": {

                                "uri": {

                                    "type""string"

                                }

                            }

                        }

                    }

                },

                "GetDlpPolicyTip": {

                    "type""object",

                    "properties": {

                        "__deferred": {

                            "type""object",

                            "properties": {

                                "uri": {

                                    "type""string"

                                }

                            }

                        }

                    }

                },

                "FieldValuesAsHtml": {

                    "type""object",

                    "properties": {

                        "__deferred": {

                            "type""object",

                            "properties": {

                                "uri": {

                                    "type""string"

                                }

                            }

                        }

                    }

                },

                "FieldValuesAsText": {

                    "type""object",

                    "properties": {

                        "__deferred": {

                            "type""object",

                            "properties": {

                                "uri": {

                                    "type""string"

                                }

                            }

                        }

                    }

                },

                "FieldValuesForEdit": {

                    "type""object",

                    "properties": {

                        "__deferred": {

                            "type""object",

                            "properties": {

                                "uri": {

                                    "type""string"

                                }

                            }

                        }

                    }

                },

                "File": {

                    "type""object",

                    "properties": {

                        "__deferred": {

                            "type""object",

                            "properties": {

                                "uri": {

                                    "type""string"

                                }

                            }

                        }

                    }

                },

                "Folder": {

                    "type""object",

                    "properties": {

                        "__deferred": {

                            "type""object",

                            "properties": {

                                "uri": {

                                    "type""string"

                                }

                            }

                        }

                    }

                },

                "LikedByInformation": {

                    "type""object",

                    "properties": {

                        "__deferred": {

                            "type""object",

                            "properties": {

                                "uri": {

                                    "type""string"

                                }

                            }

                        }

                    }

                },

                "ParentList": {

                    "type""object",

                    "properties": {

                        "__deferred": {

                            "type""object",

                            "properties": {

                                "uri": {

                                    "type""string"

                                }

                            }

                        }

                    }

                },

                "Properties": {

                    "type""object",

                    "properties": {

                        "__deferred": {

                            "type""object",

                            "properties": {

                                "uri": {

                                    "type""string"

                                }

                            }

                        }

                    }

                },

                "Versions": {

                    "type""object",

                    "properties": {

                        "__deferred": {

                            "type""object",

                            "properties": {

                                "uri": {

                                    "type""string"

                                }

                            }

                        }

                    }

                },

                "FileSystemObjectType": {

                    "type""integer"

                },

                "Id": {

                    "type""integer"

                },

                "ServerRedirectedEmbedUri": {},

                "ServerRedirectedEmbedUrl": {

                    "type""string"

                },

                "ContentTypeId": {

                    "type""string"

                },

                "Title": {

                    "type""string"

                },

                "ComplianceAssetId": {},

                "DeliverableID": {},

                "DV_ID": {},

                "DeliverableVersion": {},

                "VersionDescription": {},

                "BaseDeliverableVersion": {},

                "NotifiersId": {

                    "type""object",

                    "properties": {

                        "__metadata": {

                            "type""object",

                            "properties": {

                                "type": {

                                    "type""string"

                                }

                            }

                        },

                        "results": {

                            "type""array",

                            "items": {

                                "type""integer"

                            }

                        }

                    }

                },

                "NotifiersStringId": {

                    "type""object",

                    "properties": {

                        "__metadata": {

                            "type""object",

                            "properties": {

                                "type": {

                                    "type""string"

                                }

                            }

                        },

                        "results": {

                            "type""array",

                            "items": {

                                "type""string"

                            }

                        }

                    }

                },

                "Confidential": {

                    "type""boolean"

                },

                "ConfidentialAudienceId": {},

                "ConfidentialAudienceStringId": {},

                "Notified": {},

                "DV_Item_ID": {},

                "DV_List_ID": {},

                "BasedDV_Item_ID": {},

                "BasedDV_List_ID": {},

                "RT_List_ID": {},

                "IsLatest": {},

                "Status": {},

                "ReviewType": {},

                "ApprovalType": {},

                "EntityType": {},

                "ProjectId": {},

                "DepartmentId": {},

                "ReviewersId": {},

                "ReviewersStringId": {},

                "ID": {

                    "type""integer"

                },

                "Modified": {

                    "type""string"

                },

                "Created": {

                    "type""string"

                },

                "AuthorId": {

                    "type""integer"

                },

                "EditorId": {

                    "type""integer"

                },

                "OData__UIVersionString": {

                    "type""string"

                },

                "Attachments": {

                    "type""boolean"

                },

                "GUID": {

                    "type""string"

                }

            }

        }

    }

}

 

The json output is like:

 },

            "NotifiersStringId": {

                "__metadata": {

                    "type""Collection(Edm.String)"

                },

                "results": [

                    "13",

                    "38"

                ]

            },

            "Confidential"false,

Capture1.PNGCapture.PNG

Capture2.PNG

Can you please help me what should be done in this case to remove permission of that 2 ids and give read only.

Hi @sindhureddy 

 

Believe you need to pass each value at a time.

 

Please see this blog

 

Use Power Automate (flow) to change SharePoint Group Permission Level - Catapult - a Quisitive Compa...

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

yeah, I think I found solution I need to give item() using expression inside formula.
Capture3.PNG
Thanks for the reply @abm 

 

Hi @sindhureddy 

 

I can see you are mapping the results. So for each item item() expression is good enough. Check the run history?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (1,816)