【问题标题】:Using information from User Profiles Outside of SharePoint使用 SharePoint 外部用户配置文件中的信息
【发布时间】:2011-08-01 14:00:57
【问题描述】:

我正在创建一个网站,为我们部门的每个人创建一个页面,其中包含他们的联系信息。然后可以从名片上的二维码链接到该页面。

从他们的 SharePoint 配置文件中获取信息的最佳方式是什么?

edit:我对在 Visual Studio 中创建东西不是很熟悉。我在网站上使用 Ruby on Rails,并且我已经阅读过 SharePoint 有 REST 服务,它可以很好地工作,但我似乎无法弄清楚如何访问用户配置文件信息。

【问题讨论】:

    标签: web-services sharepoint web-applications user-profile


    【解决方案1】:

    您不需要使用 Visual Studio。您只需要能够使用来自 Ruby 的基于 SOAP 的 Web 服务。用户配置文件 Web 服务的文档在这里: http://msdn.microsoft.com/en-us/library/aa980957(office.12).aspx

    【讨论】:

    • 有人这样做的任何例子吗?特别是带有 ruby​​ Savon gem 的 SharePoint Web 服务,我似乎无法按照 Savon 网站上的说明使用它。
    • 我自己并不是一个 Ruby 或 Savon 用户,但请确保您确定了身份验证并使用某种代理工具来查看 Ruby 和 SharePoint 之间的联系。许多 SharePoint 实现都使用 NTLM 作为其 Web 身份验证技术,我知道对于某些未明确针对 Windows 的语言来说,这并不总是正确的 OOTB。
    【解决方案2】:

    您可以使用 SharePoint UserProfile WebService 来实现此目的。

    http://msdn.microsoft.com/en-us/library/ms494053.aspx

    或者,如果您需要更具体的内容,您可以创建自己的 WebService 来访问这样的 UserProfile API -

     using (var site = new SPSite("http://yourserver"))
        {
            var userProfileManager = 
                new UserProfileManager(SPServiceContext.GetContext(site));
    
            var userProfile =
                userProfileManager.GetUserProfile("domain\accountName");
    
            //iterate the userprofile properties
            foreach (UserProfileValueCollection prop in userProfile)
                Console.WriteLine(prop.Value);
        }
    

    【讨论】:

      猜你喜欢
      • 2011-01-10
      • 1970-01-01
      • 2017-04-19
      • 1970-01-01
      • 1970-01-01
      • 2023-03-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多