Skip to content

Commit

Permalink
Update Invoke-ExecRevokeSessions.ps1
Browse files Browse the repository at this point in the history
Fixed missing username from logbook when revoking sessions
  • Loading branch information
BNWEIN committed Jun 19, 2024
1 parent 8c6a200 commit afc6e78
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Function Invoke-ExecRevokeSessions {
# Interact with query parameters or the body of the request.
$TenantFilter = $Request.Query.TenantFilter
try {
$RevokeSessions = Revoke-CIPPSessions -userid $Request.Query.id -tenantFilter $TenantFilter -APIName $APINAME -ExecutingUser $request.headers.'x-ms-client-principal'
$RevokeSessions = Revoke-CIPPSessions -userid $Request.Query.id -tenantFilter $TenantFilter -username $Request.Query.Username -APIName $APINAME -ExecutingUser $request.headers.'x-ms-client-principal'
$Results = [pscustomobject]@{'Results' = $RevokeSessions }
} catch {
$Results = [pscustomobject]@{'Results' = "Failed. $($_.Exception.Message)" }
Expand Down

0 comments on commit afc6e78

Please sign in to comment.