Skip to content

[PM-32260] Fix missing device approval event logs for accepted users#7247

Open
r-tome wants to merge 2 commits intomainfrom
ac/pm-32260/fix-missing-device-approval-event
Open

[PM-32260] Fix missing device approval event logs for accepted users#7247
r-tome wants to merge 2 commits intomainfrom
ac/pm-32260/fix-missing-device-approval-event

Conversation

@r-tome
Copy link
Contributor

@r-tome r-tome commented Mar 18, 2026

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-32260

📔 Objective

Device approval requests (Event 1010) were not appearing in organization audit logs or triggering webhooks.

The root cause is that LogUserEventAsync resolves organization memberships from JWT claims, which only contain organizations where the user is Confirmed. Users in Accepted status -- the typical state when requesting device approval -- had no org claims, so the event was created as a user-level event only, with no organization-scoped copy.

This adds an includeAcceptedStatusOrgs parameter to LogUserEventAsync that resolves memberships including Accepted status, and the device approval flow now opts in.

r-tome added 2 commits March 18, 2026 16:53
…tions. Updated LogUserEventAsync method to include a new parameter for including organizations where the user has accepted status. Added corresponding unit tests to verify functionality.
… user event logging. Adjusted LogUserEventAsync method and corresponding unit tests to reflect the new parameter.
@r-tome r-tome marked this pull request as ready for review March 18, 2026 17:00
@r-tome r-tome requested review from a team as code owners March 18, 2026 17:00
@github-actions
Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Details510943b4-ae92-47f2-b73a-bd83cd3d4381

Great job! No new security vulnerabilities introduced in this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants