是否可以远程从Sharepoint on prem服务器读取数据

时间:2015-10-02 09:13:43

标签: c# sharepoint-2013 webclient

使用CSOM从Sharepoint在线读取userprofile数据非常简单。例如:

        string siteURL = @"https://foo.sharepoint.com";

        ClientContext ctx = new ClientContext(siteURL);

        var securePass = new SecureString();

        "password123".ToList().ForEach(s => securePass.AppendChar(s));

        ctx.Credentials = new SharePointOnlineCredentials("userName", securePass);

        var peopleManager = new PeopleManager(ctx);
        var personProperties = peopleManager.GetMyProperties();

        ctx.Load(personProperties, p => p.UserProfileProperties);
        ctx.ExecuteQuery();

是否可以使用WebClient或类似内容对本地Sharepoint 2013进行此操作?

0 个答案:

没有答案