AuthzModifyClaims function

The AuthzModifyClaims function adds, deletes, or modifies user and device claims in the Authz client context.

Syntax

AUTHZAPI BOOL AuthzModifyClaims(
  AUTHZ_CLIENT_CONTEXT_HANDLE            hAuthzClientContext,
  AUTHZ_CONTEXT_INFORMATION_CLASS        ClaimClass,
  PAUTHZ_SECURITY_ATTRIBUTE_OPERATION    pClaimOperations,
  PAUTHZ_SECURITY_ATTRIBUTES_INFORMATION pClaims
);

Parameters

hAuthzClientContext

A handle to the client context to be modified.

ClaimClass

Type of information to be modified. The caller can specify AuthzContextInfoUserClaims or AuthzContextInfoDeviceClaims.

pClaimOperations

A pointer to an array of AUTHZ_SECURITY_ATTRIBUTE_OPERATION enumeration values that specify the type of claim modification to make.

pClaims

A pointer to an AUTHZ_SECURITY_ATTRIBUTES_INFORMATION structure that specifies the claims to modify.

Return value

If the function succeeds, it returns TRUE.

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

Remarks

The AUTHZ_SECURITY_ATTRIBUTE_OPERATION enumeration must have only one element if the value of that element is AUTHZ_SECURITY_ATTRIBUTE_OPERATION_REPLACE_ALL. Otherwise, the array has the same number of elements as the corresponding PAUTHZ_SECURITY_ATTRIBUTES_INFORMATION.

If the AUTHZ_SECURITY_ATTRIBUTE_OPERATION enumeration is AUTHZ_SECURITY_ATTRIBUTE_OPERATION_REPLACE and the function fails, call GetLastError. If the error code is ERROR_ALREADY_EXISTS, the claim's values have duplicate entries.

Requirements

   
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header authz.h
Library Authz.lib
DLL Authz.dll