IAzTask2::RoleAssignments method (azroles.h)

The RoleAssignments method returns a collection of the role assignments associated with this task.


HRESULT RoleAssignments(
  [in]  BSTR               bstrScopeName,
  [in]  VARIANT_BOOL       bRecursive,
  [out] IAzRoleAssignments **ppRoleAssignments


[in] bstrScopeName

The name of the scope in which to check for role assignments. If the value of this parameter is an empty string, the method checks for role assignments at the application level.

[in] bRecursive

TRUE if the method checks all scopes within the application; otherwise, FALSE. This parameter is ignored if the value of the bstrScopeName parameter is not NULL.

[out] ppRoleAssignments

The address of a pointer to an IAzRoleAssignments interface that represents the collection of IAzRoleAssignment objects associated with this task.

Return value

If the method succeeds, it returns S_OK.

If the method fails, it returns an error code. For a list of common error codes, see Common HRESULT Values.


Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header azroles.h