SamAddMemberToAlias - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTSAM_H

/**
 * The SamAddMemberToAlias method adds a security principal to an alias.
 *
 * \param AliasHandle A handle to the alias.
 * \param MemberId The SID of the member to add.
 * \return NTSTATUS Successful or errant status.
 * \sa https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/
 */
NTSYSAPI
NTSTATUS
NTAPI
SamAddMemberToAlias(
    _In_ SAM_HANDLE AliasHandle,
    _In_ PSID MemberId
    );

#endif

View code on GitHub

NtDoc

This function is a wrapper over an RPC method documented in the [MS-SAMR] specification.