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.5.33325 (02.09.2025)+429b894eb63dde25f05b27278f37720b53aa9a8f
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