我想使用 CSOM 获取租户 CorporateCatalogUrl 。我尝试了以下代码并没有用。我也不确定这是正确的方法。有没有办法使用 CSOM 获取 CorporateCatalogUrl ?
using (ClientContext context = new ClientContext("https://abc-admin.sharepoint.com"))
{
context.ExecutingWebRequest += delegate (object sender, WebRequestEventArgs e)
{
e.WebRequestExecutor.WebRequest.Headers.Add("Authorization", "Bearer " + AccessToken);
};
var TenantSettings = Microsoft.SharePoint.Client.TenantSettings.GetCurrent(context);
context.Load(TenantSettings);
context.ExecuteQueryRetry();
}