在UWP中从sharepoint查找特定记录 [英] Find specific record from sharepoint in UWP

查看:72
本文介绍了在UWP中从sharepoint查找特定记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我正在使用Azure身份验证处理UWP应用。我试图通过Graph API从sharepoint获取特定记录,但失败了。我正在关注以下链接


https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/listitem_get



我不知道如何写"何处"条款。


任何帮助都将不胜感激。



谢谢

解决方案


作为一种变通方法,我们可以使用SharePoint REST API或CSOM从SharePoint检索数据,因为它们的功能更完美。


CSOM API下载链接:
https://www.microsoft.com/en-us/download/details.aspx?id=42038


更多信息供您参考。


SharePoint CSOM API


https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-client-library-code


SharePoint REST API


https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-rest-endpoints


通过CSOM进行SharePoint在线身份验证的示例。

 public static void setOnlineCredential(ClientContext clientContext,string userName,string password)
{
//设置用户名和密码
SecureString secureString = new SecureString();
foreach(charc in password.ToCharArray())
{
secureString.AppendChar(c);
}
clientContext.Credentials = new SharePointOnlineCredentials(userName,secureString);
}




祝你好运,


Lee Liu



Hello,

I am working on UWP app with Azure authentication. I am trying to get specific record from sharepoint through Graph API but failed. I am following below link

https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/listitem_get

I have no idea how to write "Where" clause.

Any help would be appreciated.

Thanks

解决方案

Hi,

As a workaround, we can use SharePoint REST API or CSOM to retrieve data from SharePoint instead because their functions are more perfect.

CSOM API download link: https://www.microsoft.com/en-us/download/details.aspx?id=42038

More information for your reference.

SharePoint CSOM API

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-client-library-code

SharePoint REST API

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-rest-endpoints

Example of SharePoint online authentication via CSOM.

public static void setOnlineCredential(ClientContext clientContext,string userName,string password)
{
      //set the user name and password
      SecureString secureString = new SecureString();
      foreach (char c in password.ToCharArray())
      {
           secureString.AppendChar(c);
      }
      clientContext.Credentials = new SharePointOnlineCredentials(userName, secureString);           
}


Best regards,

Lee Liu


这篇关于在UWP中从sharepoint查找特定记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆