Assign the queue to a team.

This C# code assigns a queue to a team, we just need the Guid for team & queue.
// ** Assign the queue to a team. **
AssignRequest assignRequest = new AssignRequest()
{
    Assignee = new EntityReference
    {
        LogicalName = "team",
        Id = new Guid("_teamGuId")
    },
 
    Target = new EntityReference("queue", new Guid("_queueGuid"))
};
 
_service.Execute(assignRequest);
 
Console.WriteLine("The queue is owned by the team.");