Powershell SDK - Get-V2025AccessRequestStatus Cannot filter by date

I am trying to retrieve all of the access requests that were submitted between a given date range. To do this, I am using the Get-V2025AccessRequestStatus cmdlet from the Powershell SDK. According to the API documentation, I should be able to filter the results by date. I have tried various date formats besides the ISO-8601 format, and I either get an error or zero results. Can someone guide me on the proper use of dates in my filter expression?

These are the values that I think are the most correct, but do not work:

$ISO8601 = "yyyy-MM-ddTHH:mm:ssZ"
# Does not work
$filter = "created ge ""$($startDate.ToString($ISO8601))"" and created le ""$($endDate.ToString($ISO8601))"""
Write-Host $filter
$accessRequests = Get-V2025AccessRequestStatus -Filters $filter -Sorters "created"

If I turn on debugging and verbose, this is the output:

DEBUG: Calling method: Get-V2025AccessRequestStatus
DEBUG: Parameter Value
DEBUG: --------- -----
DEBUG: Filters   created ge "2025-08-01T00:00:00Z" and created le "2025-08-30T23:59:59Z"
DEBUG: Sorters   created
DEBUG: Calling method: Invoke-V2025ApiClient
DEBUG: Parameter        Value
DEBUG: ---------        -----
DEBUG: Method           GET
DEBUG: Uri              /access-request-status
DEBUG: Accepts          application/json
DEBUG: ContentTypes     
DEBUG: Body             
DEBUG: HeaderParameters {}
DEBUG: QueryParameters  {[sorters, created], [filters, created ge "2025-08-01T00:00:00Z" and created le "2025-08-30T23:59:59Z"]}
DEBUG: FormParameters   {}
DEBUG: CookieParameters {}
DEBUG: ReturnType       RequestedItemStatus[]
DEBUG: IsBodyNullable   False
DEBUG: Calling Endpoint: https://sci.api.identitynow.com/v2025/access-request-status
VERBOSE: Request Headers: 
Name                           Value
----                           -----
User-Agent                     OpenAPI-Generator/1.6.1/ps
Accept                         application/json
Authorization                  Bearer <redacted>
X-SailPoint-SDK                Powershell-1.6.1


VERBOSE: Request Body: 
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 2-byte response of content type application/json

I figured it out. In the API documentation, the filter value has quotes around it.

$Filters = "accountActivityItemId eq "2c918086771c86df0177401efcdf54c0"" # String | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results)  Filtering is supported for the following fields and operators:  **accessRequestId**: *eq, in, ge, gt, le, lt, ne, sw*  **accountActivityItemId**: *eq, in, ge, gt, le, lt, ne, isnull, sw*  **created**: *eq, in, ge, gt, le, lt, ne, isnull, sw* (optional)

So I assumed (and look what happened) that when filtering for a date, the dates should have quotes around them. On the aforementioned page (V3 API Standard), it shows that dates do NOT have quotes.

created gt 2018-12-18T23:05:55Z

I guess it just depends on the data type.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.