Connectivity Software User's Guide and Reference
GetSecurityRoleIds Method



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Security.User Namespace > UserManagers Class : GetSecurityRoleIds Method
The user identity for which to retrieve security role IDs.

The value of this parameter cannot be null (Nothing in Visual Basic).

When this method returns true, contains the list of security role IDs if found; otherwise, it contains null.

The value of this parameter can be null (Nothing in Visual Basic).

The individual elements of the parameter value cannot be null (Nothing in Visual Basic).

Gets the security role IDs for the specified user identity.
Syntax
'Declaration
 
Public Function GetSecurityRoleIds( _
   ByVal userIdentity As IUserIdentity, _
   ByRef securityRoleIdList As IReadOnlyList(Of String) _
) As Boolean
'Usage
 
Dim instance As UserManagers
Dim userIdentity As IUserIdentity
Dim securityRoleIdList As IReadOnlyList(Of String)
Dim value As Boolean
 
value = instance.GetSecurityRoleIds(userIdentity, securityRoleIdList)

Parameters

userIdentity
The user identity for which to retrieve security role IDs.

The value of this parameter cannot be null (Nothing in Visual Basic).

securityRoleIdList
When this method returns true, contains the list of security role IDs if found; otherwise, it contains null.

The value of this parameter can be null (Nothing in Visual Basic).

The individual elements of the parameter value cannot be null (Nothing in Visual Basic).

Return Value

true if the security role IDs were retrieved successfully; otherwise, false.
Exceptions
ExceptionDescription

A null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.

This is a usage error, i.e. it will never occur (the exception will not be thrown) in a correctly written program. Your code should not catch this exception.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also