Udostępnij za pośrednictwem


UserHelpers Class

 

Provides helpers for getting user information.

Namespace:   Microsoft.ConfigurationManagement.Messaging.Framework
Assembly:  Microsoft.ConfigurationManagement.Messaging (in Microsoft.ConfigurationManagement.Messaging.dll)

Inheritance Hierarchy

System.Object
  Microsoft.ConfigurationManagement.Messaging.Framework.UserHelpers

Syntax

[SerializableAttribute]
public static class UserHelpers
[SerializableAttribute]
public ref class UserHelpers abstract sealed 
<SerializableAttribute>
Public NotInheritable Class UserHelpers

Properties

Name Description
System_CAPS_pubpropertySystem_CAPS_static CurrentLoggedOnUserName

Gets the user name for the current logged-on user. If it fails, the property returns null.

System_CAPS_pubpropertySystem_CAPS_static CurrentLoggedOnUserSid

Get the SID for the current logged-on user. If it fails, the property returns null.

Methods

Name Description
System_CAPS_pubmethodSystem_CAPS_static GetCurrentLoggedOnUserGroupsSid()

Get the SIDs of the user groups that the current logged-on user belongs to. If the method fails, it returns null.

System_CAPS_pubmethodSystem_CAPS_static GetUserGroupSids(WindowsIdentity)

Get the SIDs of the user groups for a specified user.

System_CAPS_pubmethodSystem_CAPS_static GetUserSid(WindowsIdentity)

Gets the user SID for a token to a user context.

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.ConfigurationManagement.Messaging.Framework Namespace

Return to top