IAzClientContext2::GetAssignedScopesPage method (azroles.h)

The GetAssignedScopesPage method retrieves a list of the scopes in which the client represented by the current IAzClientContext2 object is assigned to at least one role.

Syntax

HRESULT GetAssignedScopesPage(
  [in]      LONG    lOptions,
  [in]      LONG    PageSize,
  [in, out] VARIANT *pvarCursor,
            VARIANT *pvarScopeNames
);

Parameters

[in] lOptions

A flag that specifies whether this method checks LDAP query groups for scope assignment. Previously cached LDAP query groups are checked regardless of the value of this flag.

Value Meaning
AZ_CLIENT_CONTEXT_SKIP_LDAP_QUERY
1
LDAP query groups that were not previously cached are not checked.

[in] PageSize

The number of elements in each page result.

[in, out] pvarCursor

A pointer to a VARIANT that represents the current page of results. For the first call to the GetAssignedScopesPage method, pass VT_EMPTY as the value for this parameter to retrieve the first page of results. The number of elements on a page is determined by the value of the PageSize parameter. On output, this parameter contains the value to be passed in the next call to GetAssignedScopesPage to retrieve the next page of results. If the value of this parameter on output is EMPTY, there are no more result pages.

pvarScopeNames

On return, contains an array of variables of type VARIANT. Each element of the array is of type VT_BSTR and contains the name of a scope to which the current client is assigned. The number of elements in the array is specified by the PageSize parameter.

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

If multiple threads access the same authorization store, a call to the GetAssignedScopesPage method on one of the threads might not return accurate results if the other thread modifies the store.

In JScript, the returned SAFEARRAY values must be converted to the JScript Array object.

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
Redistributable Windows Server 2003 Administration Tools Pack on Windows XP