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.2.2.32703 (27.03.2025)+b9af25405a8dc67f2b73227b442cec4f08fd2d8a
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