Fabian Näf 9 Report post Posted May 19, 2017 Hi Support-Team I think, I just found a little bug, which occures while creating (or try to) a private Passwordlist by API. I used the following code (PowerShell) to create a Passwordlist. $Body = @{ PasswordList = $Name Description = $Description ApplyPermissionsForUserID = $UserToPermit CopySettingsFromTemplateID = $PasswordstateTemplateID LinkToTemplate = "False" Permission = "A" PrivatePasswordList = "True" NestUnderFolderID = $ParentFolderID APIKey = $PasswordStateSystemWideAPIKey } $jsonBody = $Body | ConvertTo-Json $PasswordstateURL = "$($PasswordstateURL)/api/passwordlists" If ($PasswordstateWhatIf -eq $False) { $result = Invoke-Restmethod -Method POST -Uri $PasswordstateURL -ContentType "application/json; charset=utf-8" -Body $jsonBody $output = $result.PasswordListID } Else { Write-Host $("Would Create Passwordstate-Passwordlist """ + $Name + """") -ForegroundColor Yellow $output = 0 } I think, the important part is, that I copied settings from a Template and I also set PrivatePasswordList to true, which I shouldn't do probably :-) This script works and creates a new PasswordList. But when I add the first Password, I get an ACL-Error (attached). When I set PrivatePasswordList to false, everything works without any problem. Best regards, Fabian Share this post Link to post Share on other sites
support 153 Report post Posted May 19, 2017 Hi Fabian. Thanks and we'll need to check this out, and provide a fix in the next release. Copying settings from a template should not cause this, as it's related to the permissions table. With the folder you are nesting it under, is this folder propagating permissions down at all? Regards Click Studios Share this post Link to post Share on other sites
Fabian Näf 9 Report post Posted May 20, 2017 Hi No this folder is not using propagating permissions model. It's just a new created folder with default-settings. I forgot to mention: After I created the PasswordList (with PrivatePasswordList = "true"), it's shown as Shared-Folder. Best regards, Fabian Share this post Link to post Share on other sites
support 153 Report post Posted May 20, 2017 Hi Fabian, Thanks for the information, and I think the issue is caused by you copying settings from a Template - Templates are only designed for Shared Password Lists, which I believe is why it is being set to Shared once created. If you leave the line out from copying settings from the template, do you have any issues then? Regards Click Studios Share this post Link to post Share on other sites
Fabian Näf 9 Report post Posted May 21, 2017 Hi If I don't copy settings from a template, I don't have this issue. For my script, which I'm writing currently, I have to copy settings from the template, because I need a URL-field, which is not available by default. Best regards, Fabian Share this post Link to post Share on other sites
support 153 Report post Posted May 22, 2017 Hi Fabian, Thanks for confirming, and we're going to need to fix this in the next release - and allow you to copy from a template if specified. For now, you will need to ask your users to manually select the URL field after the Private List has been created, and we should have a new build about before the start of next week. Regards Click Studios 1 Fabian Näf reacted to this Share this post Link to post Share on other sites
Fabian Näf 9 Report post Posted May 22, 2017 Thanks a lot, you're just awesome!!! Best regards, Fabian Share this post Link to post Share on other sites
support 153 Report post Posted May 22, 2017 Thanks Fabian We'll report back here when the new build is available. Regards Click Studios Share this post Link to post Share on other sites
support 153 Report post Posted May 29, 2017 Hi Fabian, Just a quick update to mention we released Passwordstate version 7883 today, which includes a fix for this bug. Thanks for reporting it and we'll also give you an email just in case you don't see this forum post:) Regards, Click Studios Share this post Link to post Share on other sites
Fabian Näf 9 Report post Posted May 29, 2017 Hi Thank's a lot for fixing this, you're incredibly fast! I've just tested it and it worked great!! But unfortunately I just runned into the next problem: I used this feature for my KeePass/Passwordsafe-Import-Script (which I posted in the General FAQs in this forum). Now I'm able to create private Passwordlists by API, but I'm not able to add Passwords to this just created private Passwordlist. I think, that I don't have access to add records to a private Passwordlist with the System-Wide API-Key. When I try to do this, I get the following error: [{"errors":[{"message":"Not Found"},{"phrase":"PasswordListID '272' Not Found in the Database."}]}] I've just looked into Passwordstate and I really have a PasswordList with the ID 272, but now (since, I updated and set PrivatePasswordList = "True") it's private I know, that I could create an API-Key for each PasswordList and it would probably work with this API-Key... but this is not a suitable option for an automatic Import from KeePass/Passwordsafe. Do you have an idea, what else I could do? I've heard, that in Version 8, there will be an Windows-User Authentication for the API, could this be an option? Best regards, Fabian Share this post Link to post Share on other sites
support 153 Report post Posted May 29, 2017 Hi Fabian, I'm not sure what the issue is here, but it could be caused by you using a System Wide API Key with Private Lists - this is not allowed for obvious reasons, so you would need to instead create an API Key for the Private List first and use this. Version 8 should help with this, as all permissions to things in the API are based on the authenticated account. Regards Click Studios Share this post Link to post Share on other sites