GetCallerAccessRights method of the __SystemSecurity class

The __SystemSecurity::GetCallerAccessRights method sets the rights parameter as a bitmap with each bit corresponding to an access right. Any client can call this to determine which rights the client has. This method is useful for clients that enable or disable features. For example, a GUI application might disable a button if the currently logged-on user does not have method execution rights.

Any enabled client has the right to call GetCallerAccessRights, even if that client does not have general method execution rights.


HRESULT GetCallerAccessRights(
  [out] sint32 rights


rights [out]

Access rights of the client. For more information, see __SystemSecurity and WMI Security Constants.

WBEM_ENABLE (1 (0x1))

Enables the account and grants the user read permissions. This is the default access right for all users.


Allows the execution of methods.


Providers may perform additional access checks.


Allows the caller, security context, or user to write to classes and instances except for system classes.


Allows the caller, security context, or user to write provider instances but not static classes or static instances to the repository.


Allows the caller, security context, or user to write classes and instances to providers.


Impersonating providers may do additional access checks.


Allows a user account to remotely perform any operations allowed by the permissions set by other bits.

READ_CONTROL (131072 (0x20000))

Allows read access to the security descriptors.

WRITE_DAC (262144 (0x40000))

Allows write access to discretionary access control lists (DACL).

Return value

This method returns an HRESULT that indicates the status of the method call. The following list lists the return values that are of significance to Set9XUserList. For scripting and Visual Basic applications, the result can be obtained from OutParameters.ReturnValue. For more information, see Constructing InParameters Objects and Parsing OutParameters Objects.


This method is not supported on supported versions of Windows.


Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
All WMI namespaces

See also

WMI System Classes




WMI Security Constants



Securing WMI Namespaces

WMI Security Constants