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='')
Solved! Go to Solution.
yeah, I think I found solution I need to give item() using expression inside formula.
Thanks for the reply @abm
Hi @sindhureddy
Are you getting any error? What do you meant by its not working?
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHi @sindhureddy
Have a look on this thread
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHI @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,
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
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogyeah, I think I found solution I need to give item() using expression inside formula.
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
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogThe first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.