Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 以编程方式获取站点列表的不同方法_C#_Sharepoint_Office365 - Fatal编程技术网

C# 以编程方式获取站点列表的不同方法

C# 以编程方式获取站点列表的不同方法,c#,sharepoint,office365,C#,Sharepoint,Office365,我正在使用office 365。我已经在Sharepoint上创建了许多站点。我想以编程方式(使用c#)获取所有站点和站点Id的列表 我使用了GraphServiceClient“wait m_GraphClient.Groups.Request().GetAsync()” 但我想知道更多获取网站列表的方法。您可以尝试搜索 https://graph.microsoft.com/v1.0/sites?search=* SPFx中的样本 this.props.context.msGraphCli

我正在使用office 365。我已经在Sharepoint上创建了许多站点。我想以编程方式(使用c#)获取所有站点和站点Id的列表

我使用了GraphServiceClient“wait m_GraphClient.Groups.Request().GetAsync()”

但我想知道更多获取网站列表的方法。

您可以尝试搜索

https://graph.microsoft.com/v1.0/sites?search=*
SPFx中的样本

this.props.context.msGraphClientFactory
      .getClient()
      .then((client: MSGraphClient): void => {       
        client          
          .api("sites?search=*")
          .version("v1.0")
          .get((error, response: any, rawResponse?: any) => {
            console.log(response);            
          });
      })
你可以试试搜索

https://graph.microsoft.com/v1.0/sites?search=*
SPFx中的样本

this.props.context.msGraphClientFactory
      .getClient()
      .then((client: MSGraphClient): void => {       
        client          
          .api("sites?search=*")
          .version("v1.0")
          .get((error, response: any, rawResponse?: any) => {
            console.log(response);            
          });
      })

如果我有两个同名站点,那么如何执行搜索查询,例如站点1-:显示名称=ABC URL=站点2:-显示名称=ABC URL=然后如何查找特定站点如果我有两个同名站点,那么如何执行搜索查询,例如站点1-:显示名称=ABC URL=站点2:-Display name=ABC URL=然后是如何查找特定站点我正在使用office 365。我已经在Sharepoint上创建了许多站点。我想通过编程(使用c#)获得所有站点和站点Id的列表。我使用了GraphServiceClient“wait m_GraphClient.Groups.Request().GetAsync()”。但我想知道更多获取网站列表的方法。此外,我想找到特定的网站。如果我有两个名称相同的站点,那么如何查找特定站点,例如站点1-:显示名称=ABC URL=站点2:-显示名称=ABC URL=然后如何查找特定站点我正在使用office 365。我已经在Sharepoint上创建了许多站点。我想通过编程(使用c#)获得所有站点和站点Id的列表。我使用了GraphServiceClient“wait m_GraphClient.Groups.Request().GetAsync()”。但我想知道更多获取网站列表的方法。此外,我想找到特定的网站。如果我有两个名称相同的站点,那么如何查找特定站点,例如站点1-:显示名称=ABC URL=站点2:-显示名称=ABC URL=然后如何查找特定站点