You can use your query like below:
<Where>
<Or>
<Membership Type=’CurrentUserGroups’>
<FieldRef Name=’AssignedTo’ />
</Membership>
<Eq>
<FieldRef Name=’AssignedTo’ LookupId=’TRUE’ />
<Value Type=’Lookup’>123</Value>
</Eq>
</Or>
</Where>
Here 123
is User ID of a SharePoint user.
The <Membership>
tag contains an attribute “type” , this attribute can contains 5 static values , below the description for each one:
SPWeb.AllUsers : this value is used to identify the tasks assigned to users (not groups)
SPGroup : using this parameter you must add the group ID like that:
<Membership Type=”SPGroup” ID=”7″>
This parameter will return list of tasks assigned to members of this group.
SPWeb.Groups : The tasks assigned to the group site collection appear but not the tasks assigned to specific groups site.
CurrentUserGroups : The tasks assigned to the current user groups will appear but not tasks assigned directly to the user.
SPWeb.Users : Tasks assigned to users who have received rights to the site directly (not through a group).
Reference:
Get tasks assigned to user or to current user groups in SharePoint using CAML query
Note: Using above query you can get the tasks assigned to particular user by passing user ID by replacing 123
in answer or you can get the tasks assigned to a group using <Membership Type=”SPGroup” ID=”7″>
(Here 7 is SharePoint group ID).