AuthzInitializeContextFromAuthzContext function

The AuthzInitializeContextFromAuthzContext function creates a new client context based on an existing client context.

Starting with Windows Server 2012 and Windows 8, this function also duplicates device groups, user claims, and device claims.

Syntax

AUTHZAPI BOOL AuthzInitializeContextFromAuthzContext(
  DWORD                        Flags,
  AUTHZ_CLIENT_CONTEXT_HANDLE  hAuthzClientContext,
  PLARGE_INTEGER               pExpirationTime,
  LUID                         Identifier,
  PVOID                        DynamicGroupArgs,
  PAUTHZ_CLIENT_CONTEXT_HANDLE phNewAuthzClientContext
);

Parameters

Flags

Reserved for future use.

hAuthzClientContext

The handle to an existing client context.

pExpirationTime

Sets the time limit for how long the returned context structure is valid. If no value is passed, then the token never expires. Expiration time is not currently enforced.

Identifier

The specific identifier for the resource manager.

DynamicGroupArgs

A pointer to parameters to be passed to the callback function that computes dynamic groups. If the value is NULL, then the callback function is not called.

phNewAuthzClientContext

A pointer to the duplicated AUTHZ_CLIENT_CONTEXT_HANDLE handle. When you have finished using the handle, release it by calling the AuthzFreeContext function.

Return Value

If the function succeeds, it returns TRUE.

If the function fails, it returns FALSE. To get extended error information, call GetLastError.

Remarks

This function calls the AuthzComputeGroupsCallback callback function to add security identifiers to the newly created context.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header authz.h
Library Authz.lib
DLL Authz.dll
Redistributable Windows Server 2003 Administration Tools Pack on Windows XP

See Also

AUTHZ_ACCESS_REPLY

Basic Access Control Functions