sailpoint-oss / powershell-sdk

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

404 when running "Get-CampaignReports" against valid campaign id #52

Closed chkmcheek closed 1 year ago

chkmcheek commented 1 year ago

Looks like I have a valid campaign ID but I'm getting a 404 when running the Get-CampaignReports cmdlet

PS C:\Users\mcheek> Get-ActiveCampaigns -Filters "id eq `"5ac6d7b91a5a4e2b93d4bd446484db8c`""

id                       : 5ac6d7b91a5a4e2b93d4bd446484db8c
name                     : 2023 Q4 - ARIES
description              : 2023 Q4 - ARIES
deadline                 : 11/8/2023 21:04:58
type                     : SEARCH
status                   : COMPLETED
correlatedStatus         : CORRELATED
emailNotificationEnabled : False
autoRevokeAllowed        : False
recommendationsEnabled   : False
created                  : 10/9/2023 21:01:47
totalCertifications      : 4
completedCertifications  : 4

PS C:\Users\mcheek> get-campaign -id 5ac6d7b91a5a4e2b93d4bd446484db8c

id                       : 5ac6d7b91a5a4e2b93d4bd446484db8c
name                     : 2023 Q4 - ARIES
description              : 2023 Q4 - ARIES
deadline                 : 11/8/2023 21:04:58
type                     : SEARCH
status                   : COMPLETED
correlatedStatus         : CORRELATED
emailNotificationEnabled : False
autoRevokeAllowed        : False
recommendationsEnabled   : False
created                  : 10/9/2023 21:01:47
totalCertifications      : 4
completedCertifications  : 4

PS C:\Users\mcheek> get-campaignreports -campaignid 5ac6d7b91a5a4e2b93d4bd446484db8c

Invoke-WebRequest: C:\Users\mcheek\OneDrive - Chesapeake Energy\Documents\PowerShell\Modules\PSSailpoint\1.1.3\v3\src\PSSailpoint\Private\ApiClient.ps1:183
Line |
 183 |              $Response = Invoke-WebRequest -Uri $UriBuilder.Uri `
     |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | {"detailCode":"404 Not found","trackingId":"c65f227ccf754bd9a8a9ccb898b42334","messages":[{"locale":"en-US","localeOrigin":"DEFAULT","text":"The server
     | did not find a current representation for the target resource."},{"locale":"und","localeOrigin":"REQUEST","text":"The server did not find a current
     | representation for the target resource."}],"causes":[]}
tyler-mairose-sp commented 1 year ago

Hey @chkmcheek,

Thank you for brining this to our attention! You'll see it fixed in https://github.com/sailpoint-oss/powershell-sdk/commit/0b35c928a31de8d40f080298b5e3058e2c63b79d and will be included in the next release

jordan-violet-sp commented 1 year ago

This issue has been mentioned on SailPoint Developer Community Forum. There might be relevant details there:

https://developer.sailpoint.com/discuss/t/powershell-script-for-downloading-campaign-reports/20077/1