0

Using Powershell to resolve a Contact UniversalID to AD name

I'm using Powershell to get Universal ID and convert to an AD name using the link below as a guide

https://support.venafi.com/hc/en-us/community/posts/223212727-How-To-Get-the-universal-name-or-Full-name-of-an-Identity-User-or-Group-by-submitting-Universal-Identifier 

I'm using another script to call the API to gather the cert info and pass the $Certdetails.contact as a variable named $UniversalID

I don't get an error when running my script, I know my API key is valid and the $universalID is being created, from the previous script, correctly. 

But I don't receive any output from the Identity call below...

##############################################################

$htBody = @{
ID = {
Prefix= "local",
Name= $null,
FullName= $null,
Universal= "$UniversalID",
IsContainer= false
}
} | ConvertTo-Json

# An array to save the cert details
$certDetails = @()

#Get list of certificates that expire in 30 days

#Execute call to TPP
$IDs = Invoke-RestMethod -Method POST -Uri "$($TPPConn.BaseURI)/Identity/Validate" -ContentType 'application/json' -Body $htBody -Headers $TPPConn.Headers

 

5 comments

Please sign in to leave a comment.