Click or drag to resize

OrganisationUnitManagerAddOrganisationUnitUser Method (PsrOrganisationUnitUser, Byte, Byte, Byte, Byte, Byte, NullableGuid, NullableMtoHashAlgorithm)

Adds the new organisation unit user and adds data rights for themself and current user.

Namespace:  PsrApi.Managers
Assembly:  PsrApi (in PsrApi.dll) Version: 9.3.0.33526 (08.10.2025)+e4d6269d444890d28afbdf39a4add0d0ad0df4f2
Syntax
C#
public Task<PsrOrganisationUnitUser> AddOrganisationUnitUser(
	PsrOrganisationUnitUser user,
	byte[] userPasswordHash,
	byte[] userPasswordSalt,
	byte[] publicKey,
	byte[] encryptedUserPrivateKey,
	byte[] encryptedCurrentUserPrivateKey,
	Nullable<Guid> parentOrganisationUnitId = null,
	Nullable<MtoHashAlgorithm> clientHashAlgorithm = null
)

Parameters

user
Type: PsrApi.DataPsrOrganisationUnitUser
User that should be added.
userPasswordHash
Type: SystemByte
Hash of the user's password.
userPasswordSalt
Type: SystemByte
Salt used to hash the password.
publicKey
Type: SystemByte
Public key of the users key pair.
encryptedUserPrivateKey
Type: SystemByte
Encrypted (with the user's password) private key of the user's key pair.
encryptedCurrentUserPrivateKey
Type: SystemByte
Encrypted (with the current user's right key) private key of the user's key pair.
parentOrganisationUnitId (Optional)
Type: SystemNullableGuid
(optional) ID of the parent organisation unit.
clientHashAlgorithm (Optional)
Type: SystemNullableMtoHashAlgorithm
The hash algorithm which was used by the client to calculate the password hash

Return Value

Type: TaskPsrOrganisationUnitUser
See Also