Trying to get a simple flow going to update the role assignment of a given folder. Our scenario is somewhat contrary to the 'norm' in that we have a document library with folders wherein each folder will have a unique set of users with permission. Working to automate the add / remove of authorized users on a per-folder basis. In my test, I can get the first part to work, but when I add the /roleassignment portion, it fails with an error 404, can't find the resource.
_api/web/GetFolderByServerRelativeUrl('Shared Documents/PermTest') <-- this works and returns info on the folder.
_api/web/GetFolderByServerRelativeUrl('Shared Documents/PermTest')/roleassignments/addroleassignment(principalid=13, roledefid=1073741827) <-- this gets 404 error.
I have validated the "principalid" and the "roledefid" so I don't think that's the problem. Any help? Here is the pertinent part of the Flow...