SharePoint アプリ、じゃなかった SharePoint アドインを追加すると、勝手にサイドメニューに追加されるので消したかったのです。今回は C#です。
// サイドナビゲーション取得
NavigationNodeCollection navLocalNodes = clientContext.Web.Navigation.QuickLaunch;
// 最近使った項目から消し去るために探す
IEnumerable<NavigationNode> ndRecent
= clientContext.LoadQuery(
navLocalNodes.Include(
n => n.Id,
n => n.Children.Include(
n2 => n2.Url, n2 => n2.Title
).Where( n2 => n2.Title == "(消し去りたい見出し)" )
).Where( n => n.Id == 1033 ) // 最近使った項目のIDを指定
);
// いったんサーバーからお取り寄せ
clientContext.ExecuteQuery();
// グルグルと
ndRecent.ToList().ForEach( n =>
{
n.Children.ToList().ForEach( n2 =>
{
// 最近使った項目から消し去る
n2.DeleteObject();
n2.Update();
});
});
// さようなら
clientContext.ExecuteQuery();