Skip to content

Data published to Moesif

To build your analytics dashboards, WSO2 Identity Server sends a record of identity activity - logins, sign-ups, sessions, tokens, and more - to Moesif.

This page tells you exactly what is sent. Use it to understand what your dashboards can show, and to answer privacy and compliance questions about your users' data. If you build your own charts in Moesif, it also names the attribute you need to filter or group by.

Note

This page evolves. Each time a new dashboard or insight is added, the events behind it are added here too.

What gets sent, at a glance

Six kinds of events are published. Each one answers a different question about your organization.

Event Sent when Helps you answer
Login A user tries to log in, at every step of the login flow. How many people are logging in, how often logins fail and why, which connections and multi-factor authentication (MFA) methods are actually used.
Sign-up A user account is created. How fast you are growing, and whether new users arrive through self sign-up, invitations, or an administrator.
Session A session starts, is refreshed, or ends. How many users are active right now, how long sessions last, and why they end.
Token issuance An OAuth2 or OpenID Connect token is issued, or a token request fails. Which applications consume tokens, which grant types they use, and how much machine-to-machine traffic you have.
Flow step Each step of a self-registration, password recovery, or invited-user registration flow. Where users drop out of your sign-up and recovery funnels.
Organization switch A user switches into an organization in a business-to-business (B2B) setup. Which organizations your users actually work in.

What personal data is included

These events describe real people, so they carry personal data. Across the events, the following may be published:

  • Who the user is - their username and unique user ID, the user store they belong to, and any attribute you use as a login identifier, such as an email address, mobile number, or national identity number. Login events additionally carry the roles assigned to the user.
  • Where they connected from - their IP address and the user agent of their browser or app.
  • What they were doing - the organization, application, and connection involved in the activity.

A few things are deliberately not sent:

  • No passwords, no one-time passwords, and no credentials of any kind.
  • No token values. Tokens are identified by an ID only, never by their contents.
  • No user profile attributes other than those listed above. Nothing else is read from the user's profile.

You decide which of these events are published. If a category is not useful to you, leave its publisher off. See Set up Moesif analytics.

How an event is shaped

Every event arrives in Moesif in the same envelope, sent to the Moesif Actions API:

{
  "actionName": "User-Authentication",
  "userId": "<user ID>",
  "companyId": "<organization ID>",
  "request": {
    "time": "<event timestamp>",
    "ipAddress": "<end user IP address>"
  },
  "metadata": {
    "...": "attributes specific to this event type"
  }
}
  • actionName names the kind of event. Filter on this in Moesif to isolate one event type.
  • userId and companyId are how Moesif groups activity by user and by organization. userId is left out when the event happens before a user can be identified, such as a login that fails at the username step.
  • Everything else lives under metadata - that is where the attributes listed below appear.
  • The user agent travels as the User-Agent header of the request, not in the body.

Two conventions are worth knowing when you build charts:

  • An attribute that could not be resolved for a particular event carries the literal value NOT_AVAILABLE rather than being dropped, so exclude that value when you total the results.
  • Most timestamps are ISO-8601 strings. The exceptions are epoch milliseconds: _timestamp on login and session events, and createdTimestamp, updatedTimestamp, and terminationTimestamp on session events. Each row below states the unit.

Logins

Login events are the busiest stream. One event is published for each step of a login flow, and one for the final outcome, so a two-factor login produces multiple events that share the same contextId.

actionName: User-Authentication

The attributes you will reach for most often are authenticationSuccess (did the login work), serviceProvider (which application), stepAuthenticator (which factor), identityProvider (which connection), and errorCode (why it failed).

All login attributes

Attribute Description
contextIdCorrelates every step of a single login attempt. Group by this to reconstruct one user's login journey.
eventIdUnique ID of this event.
eventTypeWhether this event reports a single step or the final authentication outcome.
authenticationSuccessWhether the login as a whole succeeded.
authStepSuccessWhether this individual step succeeded.
authenticationStepStep number in the login flow that this event reports on.
stepAuthenticatorAuthenticator used at this step, such as username and password, or an MFA authenticator.
identityProviderConnection used at this step.
identityProviderTypeWhether that connection is local or federated.
identityProvidersAll connections involved in the login flow.
authenticatorsAll authenticators involved in the login flow.
usernameFully qualified username of the user.
localUserNameUsername of the user in the local user store.
usernameUserInputIdentifier the user actually typed at the login screen. This may be an email address, mobile number, or another login identifier.
userStoreDomainUser store domain the user belongs to.
rolesCommaSeparatedRoles assigned to the user, as a comma-separated list.
isFirstLoginWhether this is the user's first login.
serviceProviderApplication the user logged in to.
inboundAuthTypeProtocol the application used, such as OAuth2/OIDC or SAML.
tenantDomainOrganization the login belongs to.
userResidingOrgIdOrganization the user is resident in.
userAccessingOrgIdOrganization the user is accessing.
spResidingOrgIdOrganization the application is resident in.
isOrganizationLoginWhether the login happened in an organization (B2B) context.
isSharedAppLoginWhether the login was to an application shared with an organization.
remoteIpIP address the login came from.
regionRegion resolved for the login.
rememberMeEnabledWhether the user selected "remember me".
forceAuthEnabledWhether the application forced re-authentication.
passiveAuthEnabledWhether this was a passive authentication request.
durationHow long the authentication took, in milliseconds.
errorCodeError code, when the login or step failed.
_timestampWhen the event was recorded, in epoch milliseconds.
customParam1 to customParam5Reserved for custom values added through extensions. Empty unless an extension populates them.

Sign-ups

One event per account created, whichever way the account came into existence.

actionName: User-Registration

userOnboardedMethod is the attribute that makes this stream useful: it separates self sign-ups from invitations and administrator-created accounts.

All sign-up attributes

Attribute Description
eventIdUnique ID of this event.
createdTimeStampWhen the account was created, as an ISO-8601 string.
userOnboardedMethodHow the account was onboarded: SELF_SIGNUP, USER_INVITE, or ADMIN_INITIATED.
userstoreDomainUser store the account was created in.
tenantDomainOrganization the account belongs to.
userResidingOrgIdOrganization the user is resident in.

Sessions

Three events per session: one at creation, one for each update, and one when the session ends.

actionName: User-Session

Use action to tell those three apart, activeSessionCount for concurrency, and the timestamps to work out how long sessions live.

All session attributes

Attribute Description
sessionIdUnique ID of the session.
actionWhich part of the lifecycle this event reports: creation, update, or termination.
createdTimestampWhen the session was created, in epoch milliseconds.
updatedTimestampWhen the session was last updated, in epoch milliseconds.
terminationTimestampWhen the session ended, in epoch milliseconds.
activeSessionCountHow many sessions the user holds at this moment.
usernameUsername of the session owner.
userStoreDomainUser store domain the user belongs to.
tenantDomainOrganization the session belongs to.
serviceProviderApplication the session was established for.
identityProvidersConnections involved in establishing the session.
remoteIpIP address the session came from.
regionRegion resolved for the session.
userAgentUser agent of the browser or client that established the session.
rememberMeEnabledWhether the session was established with "remember me".
_timestampWhen the event was recorded, in epoch milliseconds.

Tokens

One event per token request, successful or not. Machine-to-machine (M2M) tokens are included.

actionName: OAuth-Token-Issuance

grantType, clientId, and userType are what most token dashboards are built on. existingTokenUsed is worth knowing about. It marks a request served from an existing valid token rather than a newly issued one, which is why token counts and login counts do not line up.

No token values are published

Only tokenId, an opaque identifier, is sent. The access token, refresh token, and ID token contents never leave WSO2 Identity Server.

All token attributes

Attribute Description
clientIdClient ID of the application the token was issued to.
grantTypeOAuth2 grant type used.
userTypeWhether the token was issued for an end user or an application.
userIdUnique ID of the user the token was issued for.
userNameUsername of the user the token was issued for.
userStoreDomainUser store domain the user belongs to.
actorActing identity behind the request, when a token is requested on behalf of another identity.
tokenIdIdentifier of the issued token. Not the token itself.
iatWhen the token was issued, as an ISO-8601 string.
authorizedScopesScopes granted to the token.
unauthorizedScopesScopes requested but not granted.
accessTokenValidityMillisAccess token validity, in milliseconds.
refreshTokenValidityMillisRefresh token validity, in milliseconds.
existingTokenUsedWhether an existing valid token was returned instead of issuing a new one.
tenantDomainOrganization the request belongs to.
rootTenantDomainRoot organization of the request.
issuerOrganizationIdOrganization that issued the token.
accessingOrganizationIdOrganization the token grants access to.
appResidentTenantIdTenant the application is resident in.
appResidentOrgUuidOrganization the application is resident in.
subOrgRequestWhether the request came from one of your sub-organizations.
remoteIpIP address the request came from.
errorCodeError code, when the request failed.
errorMsgError message, when the request failed.
publishingTimeWhen the event was published, as an ISO-8601 string.

Flows

Self-registration, password recovery, and invited-user registration are multi-step flows, and this stream publishes one event per step. That is what makes funnel analysis possible: you can see how many users started sign-up, how many reached email verification, and how many finished.

actionName: User-Registration-Flow, Password-Recovery-Flow, or Invited-User-Registration-Flow

Group by flowId to follow one user through a flow, and by currentNodeId and nodeResponseStatus to find the step where people drop out.

How anonymous steps are linked to users

Early sign-up steps run before the user account exists. No user ID can be attached to them, so they are published against an anonymous identifier.

When the flow completes, a user link event goes to the Moesif Users API. It ties that anonymous identifier to the new user ID, so the funnel joins up end to end. The link event carries only those two identifiers.

All flow attributes

Attribute Description
flowTypeWhich flow this is, such as registration or password recovery.
flowIdCorrelates every step of a single flow execution.
stepTypeWhich kind of step was executed.
currentNodeIdID of the node that was executed.
currentNodeTypeWhich kind of node was executed.
nodeResponseStatusOutcome of the node execution.
nodeResponseTypeWhich kind of response the node produced.
executorNameExecutor that ran the step, for example the executor for a particular verification method.
applicationIdApplication the flow was started from.
tenantDomainOrganization the flow belongs to.
organizationIdUnique ID of that organization.
isOrganizationLoginWhether the flow ran in an organization (B2B) context.
publishTimestampWhen the event was published, as an ISO-8601 string.
errorCodeError code, when the step failed.

Organization switches

In a B2B setup, a user who belongs to one organization can access another. Each switch is published as an event.

actionName: Organization-Switch

userResidentOrgId is where the user comes from and userAccessingOrgId is where they went, so a breakdown of the two shows how your organizations relate to each other.

All organization switch attributes

Attribute Description
userResidentOrgIdThe user's home organization.
userAccessingOrgIdOrganization the user switched into.
serviceProviderApplication the switch was performed for.
serviceProviderTenantDomainTenant that application belongs to.
tenantDomainOrganization the switch belongs to.
errorCodeError code, when the switch failed.
publishTimeWhen the event was published, as an ISO-8601 string.

A note on sub-organizations

Activity inside your sub-organizations is published against the root organization, so everything lands in one place rather than being scattered across workspaces. The originating organization is preserved in attributes such as userResidingOrgId and userAccessingOrgId, so you can still filter or break down any chart by it.