Jump to content

WinAPI Create Folder with Manual Permissions


Recommended Posts



I am trying to automate creation of folders in my PasswordState environment and while I can use the API to create the folder and permission it based on a template, as soon as a folder or list is placed underneath it, the permissions of the one below it replace the permissions on the root. When I create a folder manually through the website there is the option to toggle to "Mange permissions manually for this folder", is there anyway to specify this setting when create or updating a folder's permission via the winapi?



Link to comment
Share on other sites

The jsonData looks like this:


    $body = @{
        "FolderName" = $folderName
        "Description" = $folderDescription
        "CopyPermissionsFromTemplateID" = $templateID
        "PropagatePermissions" = "False"
        "NestUnderFolderID"= $nestUnderID
    #Convert Array to Json
    $jsonData = $body | ConvertTo-Json


Essentially this top level folder should get permissions from the template that allow Users 1,2, and 3. One of the folders below it will get created and may only have users 1 and 2 but not 3. When I create the folder below it the top level folders permissions get reset to only allow users 1 and 2. 


If I create this same folder structure via the Web GUI I can set the top level folder's permissions to be set manually (so it doesn't inherit from folders or passwordlists below it) and then I am able to setup the top level folder as users 1,2, and 3 and the below folder as only users 1 and 2. After creation via the API I notice the allow folder permissions to be set manually is not set to yes so I need to know how to set this flag via the API call that creates the folder, or a separate API call that updates the folders permissions.




Link to comment
Share on other sites

Hi Yousef,


Unfortunately our API does not yet support the GUI setting for "Manual Permissions" like it does the Propagating permissions setting.  If you'd like to log a feature request for this, please do so in this forum below and we'll do our best to add this in if it gets enough votes.  By logging it here you'll be automatically notified when this feature is added into the software.






Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...