Jump to content

AD Account Discovery Description Field


PeterCCH
 Share

Recommended Posts

Most of the Active Directory users that we are importing using Passwordstate account discovery have a detailed explanation of what that account is used for in the Active Directory description field.  Is there a way to pull that field into the Passwordstate description instead of the default "Active Directory Account for domain [DomainFQDN]" description?

Link to comment
Share on other sites

Hi Peter,

 

Unfortunately in the Account Discovery job there is no possible way to synchronise those description fields.  That Description Field is just a generic Description field that we use for many different types of Passwords in the system, and therefore the Account Discovery Job was never really designed to sync that data from the Description field in AD.

 

I do have a possible work around for you though, which will include some custom scripting:

 

If you were to use a script to query the user in Active Directory and store the description data in memory, you could then use that information to update the Password Record using our API.  Information about updating an existing Password using our API can be found under Help -> Web API Documentation, but a example script to update the Description field is as follows:

 

$Description = "Results from AD query"

#JSON data for the object
    $jsonData = '
    {
	"PasswordID":"46411",
	"Description":$Description,
        "APIKey":"<apikey>"	    
    }
    '

    $PasswordstateUrl = 'https://passwordstate/api/passwords'
    $result = Invoke-Restmethod -Method Put -Uri $PasswordstateUrl -ContentType "application/json" -Body $jsonData

 

You may have also dynamically find the Password ID but that is also possible to search for it using the API using an example like below

 

$Username = "contoso\jbloggs" #this username data should come from a query from Active Directory

$PasswordstateUrl = "https://sandbox.halox.net/api/searchpasswords/?username=$Username"
$Results  = Invoke-Restmethod -Method GET -Uri $PasswordstateUrl -Header @{ "APIKey" = "4ca37695823bdfe9285afe3bc3467d87" }
$Results.PasswordID

 

I hope this helps!

 

Regards,

Support

Link to comment
Share on other sites

  • 4 months later...

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
 Share

×
×
  • Create New...