Click to Rate and Give Feedback
MSDN
MSDN Library
Security
Authorization

  Switch on low bandwidth view
Authorization Functions

Authorization functions are categorized according to usage as follows:

Basic Access Control Functions

The following functions are used with access tokens.

FunctionDescription
AccessCheckDetermines whether a security descriptor grants a specified set of access rights to the client identified by an access token.
AccessCheckByTypeDetermines whether a security descriptor grants a specified set of access rights to the client identified by an access token. The function can check the client's access to a hierarchy of objects, such as an object, its property sets, and properties. The function grants or denies access to the hierarchy as a whole.
AccessCheckByTypeResultListDetermines whether a security descriptor grants a specified set of access rights to the client identified by an access token. The function can check the client's access to a hierarchy of objects, such as an object, its property sets, and properties. The function reports the access rights granted or denied to each object type in the hierarchy.
AdjustTokenGroupsChanges the group information in an access token.
AdjustTokenPrivilegesEnables or disables the privileges in an access token. It does not grant new privileges or revoke existing ones.
AllocateAndInitializeSidAllocates and initializes a security identifier (SID) with up to eight subauthorities.
AllocateLocallyUniqueIdAllocates a locally unique identifier (LUID).
AuthzAccessCheck Determines which access bits can be granted to a client for a given set of security descriptors.
AuthzAccessCheckCallbackAn application-defined function that handles callback access control entries (ACEs) during an access check. AuthzAccessCheckCallback is a placeholder for the application-defined function name.
AuthzAddSidsToContextCreates a copy of an existing context and appends a given set of security identifiers (SIDs) and restricted SIDs.
AuthzCachedAccessCheckPerforms a fast access check based on a cached handle containing the static granted bits from a previous AuthzAccessCheck call.
AuthzComputeGroupsCallbackAn application-defined function that creates a list of security identifiers (SIDs) that apply to a client.
AuthzEnumerateSecurityEventSourcesRetrieves the registered security event sources that are not installed by default.
AuthzFreeAuditEventFrees the structure allocated by the AuthzInitializeObjectAccessAuditEvent function.
AuthzFreeContextFrees all structures and memory associated with the client context.
AuthzFreeGroupsCallbackAn application-defined function that frees memory allocated by the AuthzComputeGroupsCallback function. AuthzFreeGroupsCallback is a placeholder for the application-defined function name.
AuthzFreeHandleFinds and deletes a handle from the handle list.
AuthzFreeResourceManagerFrees a resource manager object.
AuthzGetInformationFromContextReturns information about an Authz context.
AuthzInitializeContextFromAuthzContextCreates a new client context based on an existing client context.
AuthzInitializeContextFromSidCreates a user-mode client context from a user security identifier (SID).
AuthzInitializeContextFromTokenInitializes a client authorization context from a kernel token.
AuthzInitializeObjectAccessAuditEventInitializes auditing for an object.
AuthzInitializeObjectAccessAuditEvent2Allocates and initializes an AUTHZ_AUDIT_EVENT_HANDLE handle for use with the AuthzAccessCheck function.
AuthzInitializeResourceManagerUses Authz to verify that clients have access to various resources.
AuthzInstallSecurityEventSourceInstalls the specified source as a security event source.
AuthzOpenObjectAuditOpens an object for auditing.
AuthzRegisterSecurityEventSourceRegisters a security event source with the Local Security Authority (LSA).
AuthzReportSecurityEventGenerates a security audit for a registered security event source.
AuthzReportSecurityEventFromParamsGenerates a security audit for a registered security event source by using the specified array of audit parameters.
AuthzUninstallSecurityEventSourceRemoves the specified source from the list of valid security event sources.
AuthzUnregisterSecurityEventSourceUnregisters a security event source with the Local Security Authority (LSA).
BuildExplicitAccessWithNameInitializes an EXPLICIT_ACCESS structure with data specified by the caller. The trustee is identified by a name string.
BuildImpersonateExplicitAccessWithNameObsolete. Do not use.
BuildImpersonateTrusteeObsolete. Do not use.
BuildTrusteeWithNameInitializes a TRUSTEE structure. The caller specifies the trustee name. The function sets other members of the structure to default values.
BuildTrusteeWithObjectsAndNameInitializes a TRUSTEE structure with the object-specific access control entry (ACE) information and initializes the remaining members of the structure to default values. The caller also specifies the name of the trustee.
BuildTrusteeWithObjectsAndSidInitializes a TRUSTEE structure with the object-specific access control entry (ACE) information and initializes the remaining members of the structure to default values. The caller also specifies the SID structure that represents the security identifier of the trustee.
BuildTrusteeWithSidInitializes a TRUSTEE structure. The caller specifies the security identifier (SID) of the trustee. The function sets other members of the structure to default values and does not look up the name associated with the SID.
CheckTokenMembershipDetermines whether a specified security identifier (SID) is enabled in a specified access token.
ConvertSecurityDescriptorToStringSecurityDescriptorConverts a security descriptor to a string format.
ConvertSidToStringSidConverts a security identifier (SID) to a string format suitable for display, storage, or transmission.
ConvertStringSecurityDescriptorToSecurityDescriptorConverts a string-format security descriptor into a valid, functional security descriptor.
ConvertStringSidToSidConverts a string-format security identifier (SID) into a valid, functional SID.
CopySidCopies a security identifier (SID) to a buffer.
CreateRestrictedTokenCreates a new access token that is a restricted version of an existing access token. The restricted token can have disabled security identifiers (SIDs), deleted privileges, and a list of restricting SIDs.
CreateWellKnownSidCreates a security identifier (SID) for predefined aliases.
DuplicateTokenCreates a new impersonation token that duplicates an existing token.
DuplicateTokenExCreates a new primary token or impersonation token that duplicates an existing token.
EqualDomainSidDetermines whether two security identifiers (SIDs) are from the same domain.
EqualPrefixSidTests two security-identifier (SID) prefix values for equality.
EqualSidTests two security identifier (SID) values for equality.
FreeSidFrees a security identifier (SID) previously allocated by using the AllocateAndInitializeSid function.
GetAuditedPermissionsFromAclRetrieves the audited access rights for a specified trustee.
GetEffectiveRightsFromAclRetrieves the effective access rights that an ACL structure grants to a specified trustee. The trustee's effective access rights are the access rights that the ACL grants to the trustee or to any groups of which the trustee is a member.
GetExplicitEntriesFromAclRetrieves an array of structures that describe the access control entries (ACEs) in an access control list (ACL).
GetLengthSidReturns the length, in bytes, of a valid security identifier (SID).
GetMultipleTrusteeObsolete. Do not use.
GetMultipleTrusteeOperationObsolete. Do not use.
GetNamedSecurityInfoRetrieves a copy of the security descriptor for an object specified by name.
GetSecurityDescriptorControlRetrieves a security descriptor control and revision information.
GetSecurityInfoRetrieves a copy of the security descriptor for an object specified by a handle.
GetSidIdentifierAuthorityReturns a pointer to the SID_IDENTIFIER_AUTHORITY structure in a specified security identifier (SID).
GetSidLengthRequiredReturns the length, in bytes, of the buffer required to store a SID with a specified number of subauthorities.
GetSidSubAuthorityReturns a pointer to a specified subauthority in a security identifier (SID).
GetSidSubAuthorityCountReturns a pointer to the member in a security identifier (SID) structure that contains the subauthority count.
GetTokenInformationRetrieves information about a token.
GetTrusteeFormRetrieves the trustee name from the specified TRUSTEE structure.
GetTrusteeNameRetrieves the trustee name from the specified TRUSTEE structure.
GetTrusteeTypeRetrieves the trustee type from the specified TRUSTEE structure.
GetWindowsAccountDomainSidReceives a security identifier (SID) and returns a SID that represents the domain of that SID.
InitializeSidInitializes a security identifier (SID).
IsTokenRestrictedIndicates whether a token contains a list of restricted security identifiers (SIDs).
IsValidSidValidates a security identifier (SID) by verifying that the revision number is within a known range, and that the number of subauthorities is less than the maximum.
IsWellKnownSidCompares a SID to a well known security identifier (SID) and returns TRUE if they match.
LookupAccountNameAccepts the name of a system and an account as input.
LookupAccountSidAccepts a security identifier (SID) as input.
LookupPrivilegeDisplayNameRetrieves a display name representing a specified privilege.
LookupPrivilegeNameRetrieves the name that corresponds to the privilege represented on a specific system by a specified locally unique identifier (LUID).
LookupPrivilegeValueRetrieves the locally unique identifier (LUID) used on a specified system to locally represent the specified privilege name.
NtCompareTokensCompares two access tokens and determines whether they are equivalent with respect to a call to the AccessCheck function.
OpenProcessTokenRetrieves a handle to the primary access token for a process.
OpenThreadTokenRetrieves a handle to the impersonation access token for a thread.
QuerySecurityAccessMaskCreates an access mask that represents the access permissions necessary to query the specified object security information.
RtlConvertSidToUnicodeStringConverts a security identifier (SID) to its Unicode character representation.
RtlSetSaclSecurityDescriptorSets the system access control list (SACL) in a specified security descriptor. If the security descriptor already contains a SACL, this function overwrites the existing SACL.
SetEntriesInAclCreates a new access control list (ACL) by merging new access control or audit control information into an existing ACL structure.
SetNamedSecurityInfoSets specified security information in the security descriptor of a specified object.
SetSecurityAccessMaskCreates an access mask that represents the access permissions necessary to set the specified object security information.
SetSecurityDescriptorControlSets the control bits of a security descriptor.
SetSecurityInfoSets specified security information in the security descriptor of a specified object.
SetThreadTokenAssigns an impersonation token to a thread. The function can also cause a thread to stop using an impersonation token.
SetTokenInformationSets various types of information for a specified access token.
TreeResetNamedSecurityInfoResets specified security information in the security descriptor for a tree of objects.
TreeSetNamedSecurityInfoSets specified security information in the security descriptor of a specified tree of objects.

 

Access Control Editor Functions

The following functions are used with the access control editor.

FunctionDescription
CreateSecurityPageCreates a basic security property page that enables the user to view and edit the access rights allowed or denied by the access control entries (ACEs) in an object's discretionary access control list (DACL).
DSCreateSecurityPageCreates a security property page for an Active Directory Services object.
EditSecurityDisplays a property sheet that contains a basic security property page.

 

Client/Server Access Control Functions

The following functions are used by servers to impersonate clients.

FunctionDescription
AreAllAccessesGrantedChecks whether a set of requested access rights has been granted. The access rights are represented as bit flags in an access mask.
AreAnyAccessesGrantedTests whether any of a set of requested access rights has been granted. The access rights are represented as bit flags in an access mask.
BuildSecurityDescriptorAllocates and initializes a new security descriptor.
ConvertToAutoInheritPrivateObjectSecurityConverts a security descriptor and its access control lists (ACLs) to a format that supports automatic propagation of inheritable access control entries (ACEs).
CreatePrivateObjectSecurityAllocates and initializes a self-relative security descriptor for a new private object.
CreatePrivateObjectSecurityExAllocates and initializes a self-relative security descriptor for a new private object created by the resource manager calling this function.
CreatePrivateObjectSecurityWithMultipleInheritanceAllocates and initializes a self-relative security descriptor for a new private object created by the resource manager calling this function.
CreateProcessAsUserCreates a new process and its primary thread. The new process then runs the specified executable file.
CreateProcessWithLogonWCreates a new process and its primary thread. The new process then runs the specified executable file in the security context of the specified credentials (user, domain, and password).
DestroyPrivateObjectSecurityDeletes a private object's security descriptor.
GetPrivateObjectSecurityRetrieves information from a private object's security descriptor.
ImpersonateAnonymousTokenEnables the specified thread to impersonate the system's anonymous logon token.
ImpersonateLoggedOnUserLets the calling thread impersonate the security context of a logged-on user.
ImpersonateNamedPipeClientImpersonates a named-pipe client application.
ImpersonateSelfObtains an access token that impersonates the security context of the calling process.
LookupSecurityDescriptorPartsRetrieves security information from a self-relative security descriptor.
MapGenericMaskMaps the generic access rights in an access mask to specific and standard access rights.
ObjectCloseAuditAlarmGenerates an audit message in the security event log when a handle to a private object is deleted.
ObjectDeleteAuditAlarmGenerates audit messages when an object is deleted.
ObjectOpenAuditAlarmGenerates audit messages when a client application attempts to gain access to an object or to create a new one.
ObjectPrivilegeAuditAlarmGenerates an audit message in the security event log.
PrivilegeCheckDetermines whether a specified set of privileges are enabled in an access token.
PrivilegedServiceAuditAlarmGenerates an audit message in the security event log.
RevertToSelfTerminates the impersonation of a client application.
SetPrivateObjectSecurityModifies a private object's security descriptor.
SetPrivateObjectSecurityExModifies the security descriptor of a private object maintained by the resource manager calling this function.
SetSecurityDescriptorRMControlSets the resource manager control bits in the SECURITY_DESCRIPTOR structure.

 

Low-level Access Control Functions

The following low-level functions are used to manipulate security descriptors.

FunctionDescription
AccessCheckAndAuditAlarmDetermines whether a security descriptor grants a specified set of access rights to the client being impersonated by the calling thread.
AccessCheckByTypeAndAuditAlarmDetermines whether a security descriptor grants a specified set of access rights to the client being impersonated by the calling thread. The function can check the client's access to a hierarchy of objects, such as an object, its property sets, and properties. The function grants or denies access to the hierarchy as a whole.
AccessCheckByTypeResultListAndAuditAlarmDetermines whether a security descriptor grants a specified set of access rights to the client being impersonated by the calling thread. The function can check access to a hierarchy of objects, such as an object, its property sets, and properties. The function reports the access rights granted or denied to each object type in the hierarchy.
AccessCheckByTypeResultListAndAuditAlarmByHandleDetermines whether a security descriptor grants a specified set of access rights to the client that the calling thread is impersonating. The difference between this function and AccessCheckByTypeResultListAndAuditAlarm is that this function allows the calling thread to perform the access check before impersonating the client.
AddAccessAllowedAceAdds an access-allowed access control entry (ACE) to an access control list (ACL).
AddAccessAllowedAceExAdds an access-allowed access control entry (ACE) to the end of a discretionary access control list (DACL).
AddAccessAllowedObjectAceAdds an access-allowed access control entry (ACE) to the end of a discretionary access control list (DACL). The new ACE can grant access to an object, or to a property set or property on an object.
AddAccessDeniedAceAdds an access-denied access control entry (ACE) to an access control list (ACL). The access is denied to a specified security identifier (SID).
AddAccessDeniedAceExAdds an access-denied access control entry (ACE) to the end of a discretionary access control list (DACL).
AddAccessDeniedObjectAceAdds an access-denied access control entry (ACE) to the end of a discretionary access control list (DACL). The new ACE can deny access to an object or to a property set or property on an object.
AddAceAdds one or more access control entries (ACEs) to a specified access control list (ACL).
AddAuditAccessAceAdds a system-audit access control entry (ACE) to a system access control list (ACL). The access of a specified security identifier (SID) is audited.
AddAuditAccessAceExAdds a system-audit access control entry (ACE) to the end of a system access control list (SACL).
AddAuditAccessObjectAceAdds a system-audit access control entry (ACE) to the end of a system access control list (SACL). The new ACE can audit access to an object or to a property set or property on an object.
AddMandatoryAceAdds a SYSTEM_MANDATORY_LABEL_ACEaccess control entry (ACE) to the specified system access control list (SACL).
DeleteAceDeletes an access control entry (ACE) from an access control list (ACL).
FindFirstFreeAceRetrieves a pointer to the first free byte in an access control list (ACL).
FreeInheritedFromArrayFrees memory allocated by the GetInheritanceSource function.
GetAceObtains a pointer to an access control entry (ACE) in an access control list (ACL).
GetAclInformationRetrieves information about an access control list (ACL).
GetFileSecurityObtains specified information about the security of a file or directory.
GetInheritanceSourceReturns information about the source of inherited access control entries (ACEs) in an access control list (ACL).
GetKernelObjectSecurityRetrieves a copy of the security descriptor protecting a kernel object.
GetSecurityDescriptorDaclRetrieves a pointer to the discretionary access control list (DACL) in a specified security descriptor.
GetSecurityDescriptorGroupRetrieves the primary group information from a security descriptor.
GetSecurityDescriptorLengthReturns the length, in bytes, of a structurally valid security descriptor.
GetSecurityDescriptorOwnerRetrieves the owner information from a security descriptor.
GetSecurityDescriptorSaclRetrieves a pointer to the system access control list (SACL) in a specified security descriptor.
GetUserObjectSecurityRetrieves security information for the specified user object.
InitializeAclInitializes a new ACL structure.
InitializeSecurityDescriptorInitializes a new security descriptor.
IsValidAclValidates an ACL.
IsValidSecurityDescriptorDetermines whether the components of a security descriptor are valid.
MakeAbsoluteSDCreates a security descriptor in absolute format by using a security descriptor in self-relative format as a template.
MakeSelfRelativeSDCreates a security descriptor in self-relative format by using a security descriptor in absolute format as a template.
NetShareGetInfoRetrieves information about a particular shared resource on a server.
NetShareSetInfoSets the parameters of a shared resource.
QueryServiceObjectSecurityRetrieves a copy of the security descriptor associated with a service object.
RegGetKeySecurityRetrieves a copy of the security descriptor protecting the specified open registry key.
RegSetKeySecuritySets the security of an open registry key.
SetAclInformationSets information about an ACL.
SetFileSecuritySets the security of a file or directory object.
SetKernelObjectSecuritySets the security of a kernel object. For example, this can be a process, thread, or event.
SetSecurityDescriptorDaclSets information in a DACL.
SetSecurityDescriptorGroupSets the primary group information of an absolute-format security descriptor, replacing any primary group information already present in the security descriptor.
SetSecurityDescriptorOwnerSets the owner information of an absolute-format security descriptor.
SetSecurityDescriptorSaclSets information in a system access control list (SACL).
SetServiceObjectSecuritySets the security descriptor of a service object.
SetUserObjectSecuritySets the security of a user object.

 

Audit Policy Functions

FunctionDescription
AuditComputeEffectivePolicyBySidComputes the effective audit policy for one or more subcategories for the specified security principal. The function computes effective audit policy by combining system audit policy with per-user policy.
AuditComputeEffectivePolicyByTokenComputes the effective audit policy for one or more subcategories for the security principal associated with the specified token. The function computes effective audit policy by combining system audit policy with per-user policy.
AuditEnumerateCategoriesEnumerates the available audit-policy categories.
AuditEnumeratePerUserPolicyEnumerates users for whom per-user auditing policy is specified.
AuditEnumerateSubCategoriesEnumerates the available audit-policy subcategories.
AuditFreeFrees the memory allocated by audit functions for the specified buffer.
AuditLookupCategoryGuidFromCategoryIdRetrieves a GUID structure that represents the specified audit-policy category.
AuditLookupCategoryIdFromCategoryGuidRetrieves an element of the POLICY_AUDIT_EVENT_TYPE enumeration that represents the specified audit-policy category.
AuditLookupCategoryNameRetrieves the display name of the specified audit-policy category.
AuditLookupSubCategoryNameRetrieves the display name of the specified audit-policy subcategory.
AuditQueryPerUserPolicyRetrieves per-user audit policy in one or more audit-policy subcategories for the specified principal.
AuditQuerySystemPolicyRetrieves system audit policy for one or more audit-policy subcategories.
AuditSetPerUserPolicySets per-user audit policy in one or more audit subcategories for the specified principal.
AuditSetSystemPolicySets system audit policy for one or more audit-policy subcategories.

 

Send comments about this topic to Microsoft

Build date: 6/26/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker