sailpoint-oss / powershell-sdk

PowerShell Module for accessing SailPoint IdentityNow APIs
https://developer.sailpoint.com/
MIT License
21 stars 15 forks source link

Search-Get is failing to retrieve identities if attributes are added #38

Closed patrice-adp closed 1 year ago

patrice-adp commented 1 year ago

When we customize the identities adding attribute, then the "Search-Get" method get the document but fails to convert it and so nothing can be retrieved.

Output I got : C:\Program Files\WindowsPowerShell\Modules\PSSailpoint\v3\src\PSSailpoint\Model\SearchDocument.ps1:174 Line | 174 | throw "Error! The JSON payload doesn't matches any type d …

Why not passing the index used to do the search to method ConvertFrom-JsonToSearchDocument instead of trying to dynamically found the correct document type ? When model is altered (like identities) this can't work.

tyler-mairose-sp commented 1 year ago

Hello @patrice-adp,

Thank you for bringing this to our attention, we simplified the searchDocument schema so that it is returned like a normal PowerShell Object. You will now be able to use the Search-Get Cmdlet and see all attributes returned available. This change is in https://github.com/sailpoint-oss/powershell-sdk/commit/67bd781d0bf8ad7963b74bc93a321319d340e5ac and will pushed with the next release!