First PIMRequest work, but second does not
Closed this issue · 2 comments
erkjo commented
I think there is a bug in New-AzurePIMRequest
. First request works fine. Second only returns User user@xx.com
is already elevated`.
When I look into the code, I see that line 80 is querying existing role assignments, but the where clause does not filter for resource id.
$ExistingRoleAssignmentRequest = AzureADPreview\Get-AzureADMSPrivilegedRoleAssignmentRequest -ProviderId azureResources | Where-Object RequestedDateTime -gt (Get-Date).AddHours(-8)
janegilring commented
Good catch - will look into adding a filter for resource id. Thanks for reporting!
janegilring commented
Fixed by 20413d2
Updated module published to PS Gallery.