Table of Contents

Class User

Namespace
BiExcellence.OpenBi.Api.Users
Assembly
BiExcellence.OpenBi.Api.Client.dll

A user account. Its rights come from the usergroups it belongs to, the data it sees from its organisations and the content it may open from its roles. The password is not part of it - see SetUserPasswordAsync(IOpenBiApiClient, string, string, CancellationToken).

public sealed record User : IUser
Inheritance
object
User
Implements

Properties

ActivationId

The one-time id in an account activation or password reset link, set by the self-registration and forgotten-password flows and cleared once it has been used. null otherwise.

[JsonPropertyName("activationId")]
public string? ActivationId { get; init; }

Property Value

string

Birthdate

The user's date of birth.

[JsonPropertyName("birthdate")]
public DateTimeOffset? Birthdate { get; init; }

Property Value

DateTimeOffset?

City

The city of the user's postal address.

[JsonPropertyName("city")]
public string? City { get; init; }

Property Value

string

Company

The user's company, free text.

[JsonPropertyName("company")]
public string? Company { get; init; }

Property Value

string

Country

The country of the user's postal address.

[JsonPropertyName("country")]
public string? Country { get; init; }

Property Value

string

CustomAttributes

Additional attributes stored with the user, keyed by attribute name, beyond the fixed fields.

[JsonPropertyName("customAttributes")]
public Dictionary<string, JsonElement>? CustomAttributes { get; init; }

Property Value

Dictionary<string, JsonElement>

Department

The user's department, free text.

[JsonPropertyName("department")]
public string? Department { get; init; }

Property Value

string

Email

The user's email address.

[JsonPropertyName("email")]
public string? Email { get; init; }

Property Value

string

Fax

The user's fax number.

[JsonPropertyName("fax")]
public string? Fax { get; init; }

Property Value

string

Firstname

The user's first (given) name.

[JsonPropertyName("firstname")]
public string? Firstname { get; init; }

Property Value

string

Function

The user's job title or function, free text.

[JsonPropertyName("function")]
public string? Function { get; init; }

Property Value

string

Group

A free-text group label. Not a usergroup - membership in those is GetUserUsergroupsAsync(IOpenBiApiClient, string, OpenBiListRequest?, CancellationToken).

[JsonPropertyName("group")]
public string? Group { get; init; }

Property Value

string

Id

The username the user logs in with, which is also its id. Required on create.

[JsonPropertyName("id")]
public string? Id { get; init; }

Property Value

string

InitialPassword

Whether the user is still on a password an administrator set (see SetUserPasswordAsync(IOpenBiApiClient, string, string, CancellationToken)) and has to set one of its own at the next login. Cleared when the user changes its password.

[JsonPropertyName("initialPassword")]
public bool InitialPassword { get; init; }

Property Value

bool

InvalidLoginAttempts

Failed password logins since the last successful one. Counted by the server and reset by a successful login; where the server limits them, a user that has reached the limit cannot log in.

[JsonPropertyName("invalidLoginAttempts")]
public int? InvalidLoginAttempts { get; init; }

Property Value

int?

IsActive

Whether the user may log in. An inactive user is refused at login, and an API key belonging to it gets no access token. false unless set, so a user created without it cannot log in.

[JsonPropertyName("isActive")]
public bool IsActive { get; init; }

Property Value

bool

LastInvalidLogin

When a password login last failed for this user. Set by the server.

[JsonPropertyName("lastInvalidLogin")]
public DateTimeOffset? LastInvalidLogin { get; init; }

Property Value

DateTimeOffset?

LastLogin

When the user last logged in successfully. Set by the server.

[JsonPropertyName("lastLogin")]
public DateTimeOffset? LastLogin { get; init; }

Property Value

DateTimeOffset?

LastPasswordChange

When the password was last set. Set by the server; where passwords expire, it is what the expiry is counted from.

[JsonPropertyName("lastPasswordChange")]
public DateTimeOffset? LastPasswordChange { get; init; }

Property Value

DateTimeOffset?

Lastname

The user's last (family) name.

[JsonPropertyName("lastname")]
public string? Lastname { get; init; }

Property Value

string

Location

The user's office location, free text.

[JsonPropertyName("location")]
public string? Location { get; init; }

Property Value

string

Mobile

The user's mobile phone number.

[JsonPropertyName("mobile")]
public string? Mobile { get; init; }

Property Value

string

Phone

The user's phone number.

[JsonPropertyName("phone")]
public string? Phone { get; init; }

Property Value

string

PostalCode

The postal code of the user's postal address.

[JsonPropertyName("postalCode")]
public string? PostalCode { get; init; }

Property Value

string

ProfilePicture

The user's profile picture as raw image bytes, base64 encoded in JSON.

[JsonPropertyName("profilePicture")]
public byte[]? ProfilePicture { get; init; }

Property Value

byte[]

RegistrationDate

When the user registered or was created.

[JsonPropertyName("registrationDate")]
public DateTimeOffset RegistrationDate { get; init; }

Property Value

DateTimeOffset

Room

The user's room, free text.

[JsonPropertyName("room")]
public string? Room { get; init; }

Property Value

string

Salutation

The form of address, free text.

[JsonPropertyName("salutation")]
public string? Salutation { get; init; }

Property Value

string

Street

The street of the user's postal address.

[JsonPropertyName("street")]
public string? Street { get; init; }

Property Value

string

Superior

The username of the user's superior. Cleared when that user is deleted.

[JsonPropertyName("superior")]
public string? Superior { get; init; }

Property Value

string