IAzClientContext2::AddRoles method (azroles.h)
The AddRoles method adds the specified array of existing IAzRole objects to the client context.
Syntax
HRESULT AddRoles(
[in] VARIANT varRoles,
[in] BSTR bstrScopeName
);
Parameters
[in] varRoles
The array of role names that specify the IAzRole objects to add to the client context.
[in] bstrScopeName
The scope to which the array of roles applies.
Return value
If the method succeeds, the method returns S_OK.
If the method fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.
Remarks
The IAzRole objects associated with the names in the varRoles array must already exist in the specified scope.
The added roles are used in subsequent calls to the AccessCheck and GetRoles methods.
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2008, Windows Server 2003 with SP1 [desktop apps only] |
Target Platform | Windows |
Header | azroles.h |
Library | Azroles.lib |
DLL | Azroles.dll |