<div class="content"><p align="right"><a href="https://msdn.microsoft.com/en-us/library/3ed5030d-88a3-42ca-a6e0-8c12aa2fdfbd" data-linktype="external">msdn link</a></p><p>The SamrGetMembersInGroup method reads the members of a
group.</p><dl>
<dd>
<div><pre> long SamrGetMembersInGroup(
   [in] SAMPR_HANDLE GroupHandle,
   [out] PSAMPR_GET_MEMBERS_BUFFER* Members
 );
</pre></div>
</dd></dl><p><b>GroupHandle: </b>An RPC context handle, as
specified in section <a href="8138c078-d881-4d1f-b378-94b4c34a287a" data-linktype="relative-path">2.2.7.2</a>,
representing a <a href="7b2aeb27-92fc-41f6-8437-deb65d950921#gt_7ce4771c-2043-49b8-85d3-0c60c7789f9a" data-linktype="relative-path">group object</a>.</p><p><b>Members: </b>A structure containing an array of <a href="7b2aeb27-92fc-41f6-8437-deb65d950921#gt_df3d0b61-56cd-4dac-9402-982f1fedc41c" data-linktype="relative-path">RIDs</a>, as well as an array
of attribute values.</p><p>This protocol asks the RPC runtime, via the <b>strict_context_handle</b>
attribute, to reject the use of context handles created by a method of a
different RPC interface than this one, as specified in <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/38ae9f5a-dac2-46ad-b2b7-9c43f211d9f6" data-linktype="relative-path">3</a>.</p><p>Upon receiving this message, the server MUST process the
data from the message subject to the following constraints:</p><ol><li><p><span>    </span>The server MUST
return an error if <i>GroupHandle.HandleType</i> is not equal to
&#34;Group&#34;.</p>
</li><li><p><span>    </span><i>GroupHandle.GrantedAccess</i>
MUST have the required access specified in section <a href="87bacbd0-7b8b-429f-abc6-4b3d895d4e90" data-linktype="relative-path">3.1.2.2</a>. Otherwise, the
server MUST return STATUS_ACCESS_DENIED.</p>
</li><li><p><span>    </span>Let G be the
group object referenced by <i>GroupHandle.Object</i>.</p>
</li><li><p><span>    </span>Let M be the set
of values of G&#39;s member attribute such that the groupType of the object
referenced by each value is GROUP_TYPE_SECURITY_ACCOUNT or
GROUP_TYPE_SECURITY_UNIVERSAL. Objects with groupType
GROUP_TYPE_SECURITY_RESOURCE are ignored.</p>
</li><li><p><span>    </span>If the <a href="7b2aeb27-92fc-41f6-8437-deb65d950921#gt_9066e9dc-8275-4452-9073-daab5fd427c5" data-linktype="relative-path">domain prefix</a> of the <b>objectSid</b>
attribute of any object in set M is different from the domain prefix of G&#39;s <b>objectSid</b>,
the server SHOULD<a id="Appendix_A_Target_64"></a><a aria-label="Product behavior note 64" href="fa61e5fc-f8fb-4d5b-9695-c724af0c3829#Appendix_A_64" data-linktype="relative-path">&lt;64&gt;</a> return
STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER.</p>
</li><li><p><span>    </span>On output:</p>
<ol><li><p><span>   
</span><b>Members.MemberCount</b> MUST be equal to the number of values in M.</p>
</li><li><p><span>   
</span>The <b>Members.Members</b> array MUST contain the RelativeIds of the <b>objectSid</b>
attribute values for all objects in set M.</p>
</li><li><p><span>   
</span>For each element in the <b>Members.Members</b> array, see section <a href="87988bdd-b100-4b19-874e-9fce919d9114" data-linktype="relative-path">3.1.5.14.7</a> for a message
processing specification of each element in the <b>Members.Attributes</b>
array.</p>
</li></ol></li></ol></div>