You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Logs API requires the format for date query params to be ISO8601 (i.e. 2024-10-21T16:24:13Z or Get-Date (Get-Date).ToUniversalTime() -UFormat '+%Y-%m-%dT%H:%M:%SZ'). The existing Get-OktaLogs cmdlet doesn't preserve formats, causing the API call to fail.
There are several routes we can explore to fix the issue:
Update the Cmdlet interface to receive strings instead of dates:
Keep the same Cmdlet interface but address the format internally
Get-OktaLogs -since $sinceUtcDate -until $untilUtcDate
//OktaSystemLogApi.ps1
// Assume $Since is already in UTC format
if ($Since) {
$LocalVarQueryParameters['since'] = $Since.ToString("yyyy-MM-ddTHH:mm:ssZ")
}
We should update docs to show examples of how to use the logs cmdlets
The text was updated successfully, but these errors were encountered:
The Logs API requires the format for date query params to be ISO8601 (i.e.
2024-10-21T16:24:13Z
orGet-Date (Get-Date).ToUniversalTime() -UFormat '+%Y-%m-%dT%H:%M:%SZ'
). The existingGet-OktaLogs
cmdlet doesn't preserve formats, causing the API call to fail.There are several routes we can explore to fix the issue:
We should update docs to show examples of how to use the logs cmdlets
The text was updated successfully, but these errors were encountered: