## Documentation

- About
- Read First
  - What is IdentityServer
  - Installation Scenarios
- Migrations
- Bootstrapping
- Configuration & Integration
  - AdminUI Settings
  - Configuring AdminUI
  - Configuring AdminUI (NuGet)
  - Integrating with Identity Server
  - Integrating with Identity Server Custom Schema
  - Integrating with Quickstarts
  - Enabling Logging
- Installation
  - Installer
  - IIS
  - Azure
    - Install in Azure
    - Create Azure Web App
  - Docker
  - NuGet
- Custom Database Connections
- Custom Identity Store
  - Overview
  - Partial Implementation
  - Full Implementation
  - Tenancy With Entity Framework
  - NoSql Implementation (MongoDB)
- Custom CSP
- Users
  - Searching for Users
  - Adding Users
  - Editing Users
  - Deleting Users
  - Merge Users
  - Set User Password
  - Session Management
  - User Reports
- Roles
  - Creating Roles
  - Managing Roles
  - Managing Users in a Role
  - Managing Role Claims
- Claim Types
- Clients
  - Searching for Clients
  - Adding Clients
  - Adding a SAML Client
  - Adding a WS-Fed Client
  - Editing Clients
  - Deleting Clients
  - Clone Client
- Import and Export
  - Exporting Clients
  - Importing Clients
  - Importing Client Configuration with Secrets
  - Importing SAML Clients with Certificates
  - Import and Export Via the API
- Dynamic Authentication Providers
  - What is Dynamic Authentication
  - Enabling or disabling Dynamic Authentication
  - Add a Dynamic Provider
    - First Steps
    - Adding OIDC Provider
    - Adding SAML Provider
  - Edit a Dynamic Provider
    - Accessing edit view
    - Editing a OIDC Provider
    - Editing a SAML Provider
  - Deleting a Provider
  - Searching for Provider
- Resources
  - Searching for Resources
  - Creating Resources
  - Editing resources
- Webhooks
  - Webhooks
  - Endpoint Configuration
- User Settings Endpoints
- Access Policy
- Keys
- Auditing
- FAQs
- Troubleshooting
  - Unable to start AdminUI
  - Unable to contact IdentityServer
  - Unable to contact API
  - Unable to log in

### User Reports

- -User Reports
- -Creating a custom user report

## User Reports

Using the AdminUI reports feature, you can create your own custom user reports to fit your requirements. These can then be run from the user reports screen.

We have included the following reports by default:

- Report: All Locked Out Users - shows users that are currently locked out.

- Report: All Users with Unconfirmed Email - shows users that have not confirmed their email address.

## Creating a custom user report

Here is an example of the LockedOutUsersReport, this report is setup to return all users that are currently lockedout in a ASP.NET User store.

    public class LockedOutUsersReport(IIdentityUnitOfWorkFactory uowFactory, TimeProvider timeProvider) : UserReport("alllockedoutexample", "Report: All Locked Out Users")
    {
        public override async Task<PagedResult<UserReportRow>> Execute(int page, int pageSize)
        {
            var uow = uowFactory.Create();

            var pagination = new Pagination(page, pageSize);

            IQueryable<IdentityExpressUser> queryableUsers = uow.UserManager.Users.Include(x=>x.Claims).Where(x => x.LockoutEnabled && x.LockoutEnd > timeProvider.GetUtcNow());

            int userCount = await queryableUsers.CountAsync();

            queryableUsers = pagination.ApplyPagination(queryableUsers);

            return new PagedResult<UserReportRow>(pagination)
            {
                Results = (await queryableUsers.ToListAsync()).Select(x=> new UserReportRow(x.Id, x.UserName, x.FirstName + " " + x.LastName, x.Email)),
                TotalCount = userCount
            };
        }
    }

The report then needs to be enabled in AdminUI by adding the following to your AddAdminUI method.

    builder.Services.AddAdminUI()
        .AddUserReport<LockedOutUsersReport>();

Previous Next