View Audit Log events for an organization in the WorkOS Admin Portal.
Audit Log events can be viewed in the WorkOS Admin Portal. Links can be generated through the WorkOS API and sent to your customers for viewing events associated with their Organization.
When creating a link for an Admin Portal session, you must provide the Organization ID whose events will be displayed in the Admin Portal, and specify the intent as audit_logs
.
import { WorkOS } from '@workos-inc/node'; const workos = new WorkOS('sk_example_123456789'); const { link } = await workos.portal.generateLink({ organization: 'org_01EHZNVPK3SFK441A1RGBFSHRT', intent: 'audit_logs', }); // Redirect to link
Navigating to the provided link will result in the following view. Users will be able to view and export Audit Log events just as can be done through the WorkOS Dashboard.