# Monitoring Identity and Access Management

Where to see who did what, which requests were refused, and the sign-in alerts people receive.

Identity and Access Management has no metrics or alarms of its own. What it records goes to the
organization's audit log.

## The audit log

Open **Identity**, then choose **Audit log**, or run `dcloud iam audit-logs list`. Reading it needs
`iam:GetAuditLogs`.

| What is recorded                                           | Shown as                                                                     |
| ---------------------------------------------------------- | ---------------------------------------------------------------------------- |
| Every write, allowed or refused                            | the action, such as `iam:AttachUserPolicy`                                   |
| Sensitive reads, also when allowed                         | the action, such as `iam:GetInvitationLink`                                  |
| A refused ordinary read that ends in `403`                 | at most once a minute per principal and action                               |
| Sign-ins, sign-outs, password and second-factor changes    | `auth:` actions, such as `auth:SignIn` and `auth:EnableTwoFactor`            |
| Joining an organization and switching to another           | `auth:JoinOrganization`, `auth:SwitchOrganization`                           |
| Token exchanges for a role that exists, allowed or refused | `iam:AssumeRoleWithWebIdentity`, with the token's claims once it is verified |

Open an entry to see its details. A refused entry made by a person, for an action that is not an
`auth:` action, has the link **Why? Open in the policy simulator** beside its outcome, which opens
the simulator with the user, the action and the resource filled in; see
[Test access with the policy simulator](test-access-with-the-simulator.md).

Filters, exports to other destinations, retention and how to check that the log was not altered are
described on [Audit log](/docs/audit-log).

## Alerts to people

People are emailed about their own account: a sign-in from a new device, a changed password, second
factors turned on or off, and being signed out by an administrator. See
[Manage your sessions](manage-your-sessions.md).

## Related

- [How a request is decided](how-a-request-is-decided.md)
- [Security](security.md)
