forked from pnp/PnP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fixign for getting list of my sites method in the core component p…
- Loading branch information
1 parent
4072322
commit 2e438b6
Showing
2 changed files
with
10 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,10 @@ static void Main(string[] args) | |
{ | ||
|
||
// Office 365 Multi-tenant sample | ||
ClientContext cc = new AuthenticationManager().GetSharePointOnlineAuthenticatedContextTenant("https://bertonline-my.sharepoint.com", "[email protected].com", GetPassWord()); | ||
ClientContext cc = new AuthenticationManager().GetSharePointOnlineAuthenticatedContextTenant("https://yourtenant-my.sharepoint.com", "keyzersoze@yourtenant.com", GetPassWord()); | ||
|
||
// Office 365 Dedicated sample - On-Premises sample | ||
//ClientContext cc = new AuthenticationManager().GetNetworkCredentialAuthenticatedContext("https://my.microsoft.com", "bjansen", GetPassWord(), "europe"); | ||
//ClientContext cc = new AuthenticationManager().GetNetworkCredentialAuthenticatedContext("https://my.contoso.com", "keyzersoze", GetPassWord(), "contoso"); | ||
|
||
Console.WriteLine("----------------------------------------------------------------------"); | ||
|
||
|
@@ -29,16 +29,16 @@ static void Main(string[] args) | |
//List<SiteEntity> sites = cc.Web.SiteSearch(); | ||
|
||
// Lists site collections scoped to an URL | ||
//List<SiteEntity> sites = cc.Web.SiteSearchScopedByUrl("https://bertonline.sharepoint.com"); | ||
//List<SiteEntity> sites = cc.Web.SiteSearchScopedByUrl("https://yourtenant.sharepoint.com"); | ||
// List site collections scoped by title | ||
//List<SiteEntity> sites = cc.Web.SiteSearchScopedByTitle("test"); | ||
|
||
// if needed furhter refine the returned set of site collections | ||
var bertSites = from p in sites | ||
where p.Url.Contains("kevin") | ||
select p; | ||
var filteredSites = from p in sites | ||
where p.Url.Contains("my") | ||
select p; | ||
|
||
foreach (var site in bertSites) | ||
foreach (var site in filteredSites) | ||
{ | ||
Console.WriteLine("Title: {0}", site.Title); | ||
Console.WriteLine("Path: {0}", site.Url); | ||
|