05-14-2019 10:00 PM
So I am using the function DUO gave me and trying to do some “-or” queries for the admin logs…cant get it to work…the parameters are basically a hash table
if I try multiple queries, the throttling kicks in and kills the script…thoughts?
here is an example of the data I am trying to get, and according to the API, I should be able to do an “OR” query…just no clue how
$rawdisableddata = (Invoke-DuoMethod -Ikey $ikey -Skey $skey -host $Uri -Method get -path “/admin/v2/logs/authentication” -Params `
@{mintime=$starttime;maxtime=$stoptime;reasons=“user_disabled”}).response.authlogs
$rawbadpasscodedata = (Invoke-DuoMethod -Ikey $ikey -Skey $skey -host $Uri -Method get -path “/admin/v2/logs/authentication” -Params `
@{mintime=$starttime;maxtime=$stoptime;reasons=“invalid_passcode”}).response.authlogs
$rawnoresponsedata = (Invoke-DuoMethod -Ikey $ikey -Skey $skey -host $Uri -Method get -path “/admin/v2/logs/authentication” -Params `
@{mintime=$starttime;maxtime=$stoptime;reasons=“no_response”}).response.authlogs
$rawnokeypresseddata = (Invoke-DuoMethod -Ikey $ikey -Skey $skey -host $Uri -Method get -path “/admin/v2/logs/authentication” -Params `
@{mintime=$starttime;maxtime=$stoptime;reasons=“no_keys_pressed”}).response.authlogs
07-16-2020 01:34 AM
what are you doing this by those script?
07-16-2020 08:00 AM
I was using this to create automated reporting of events for folks and upstream application…but I needed a way to filter for multiple criteria…while the api would allow it, the hash table the function had did not, so I had to adjust the function a bit…I ended up creating a unique index id for each row…not pretty but works
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide