Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 834 Bytes

File metadata and controls

32 lines (25 loc) · 834 Bytes
description Automatically generated file. DO NOT MODIFY
// Code snippets are only available for the latest version. Current version is 5.x

// Dependencies
using Microsoft.Graph.Users.Item.FollowedSites.Add;
using Microsoft.Graph.Models;

var requestBody = new AddPostRequestBody
{
	Value = new List<Site>
	{
		new Site
		{
			Id = "contoso.sharepoint.com,da60e844-ba1d-49bc-b4d4-d5e36bae9019,712a596e-90a1-49e3-9b48-bfa80bee8740",
		},
		new Site
		{
			Id = "contoso.sharepoint.com,da60e844-ba1d-49bc-b4d4-d5e36bae9019,0271110f-634f-4300-a841-3a8a2e851851",
		},
	},
};

// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Users["{user-id}"].FollowedSites.Add.PostAsAddPostResponseAsync(requestBody);