AuthzModifyClaims function (authz.h)

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

Syntax

AUTHZAPI BOOL AuthzModifyClaims(
  [in]           AUTHZ_CLIENT_CONTEXT_HANDLE            hAuthzClientContext,
  [in]           AUTHZ_CONTEXT_INFORMATION_CLASS        ClaimClass,
  [in]           PAUTHZ_SECURITY_ATTRIBUTE_OPERATION    pClaimOperations,
  [in, optional] PAUTHZ_SECURITY_ATTRIBUTES_INFORMATION pClaims
);

Parameters

[in] hAuthzClientContext

A handle to the client context to be modified.

[in] ClaimClass

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

[in] pClaimOperations

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

[in, optional] 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

Requirement Value
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