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
//CSOM Assembly version - 16.1.4727.1200 | |
//using Microsoft.SharePoint.Client | |
//GetFirstStageRecyclebinItems(credentials, weburl); | |
private static void GetFirstStageRecyclebinItems(SharePointOnlineCredentials credentials, string weburl) | |
{ | |
RecycleBinItemCollection recyclebinItems = null; | |
using (ClientContext ctx = new ClientContext(weburl)) | |
{ |
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
//using Microsoft.SharePoint.Client; | |
//using Microsoft.Online.SharePoint.TenantAdministration; | |
//string weburl = "https://site-admin.sharepoint.com"; | |
//GetSiteCollections(credentials, weburl); | |
//This method returns the count of Site Collections available in the tenant | |
//Also returns thr url of all site collections | |
private static void GetSiteCollections(SharePointOnlineCredentials credentials, string weburl) | |
{ |
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
//using Microsoft.SharePoint.Client; | |
//using Microsoft.Online.SharePoint.TenantAdministration; | |
//string weburl = "https://site-admin.sharepoint.com"; | |
//GetSite(credentials, weburl); | |
//This method returns the site collection object based on the url. | |
//shows the count of all subwebs available with in SharePoint online Site Collection | |
//Microsoft.Online.SharePoint.TenantAdministration.SiteProperties.WebsCount property | |
private static void GetSite(SharePointOnlineCredentials credentials, string weburl) |
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
//using Microsoft.SharePoint.Client; | |
//using System.Net | |
//GetAllLists(credentials, weburl); | |
//This method returns all the lists and libraries from SharePoint website | |
private static void GetAllLists(ICredentials credentials, string weburl) | |
{ | |
using (ClientContext ctx = new ClientContext(weburl)) | |
{ | |
ctx.Credentials = credentials; |
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
//Author - Shantha Kumar T | |
//This Javascript snippet to get the gists details from gist web page through browser console | |
// | |
var snips = document.getElementsByClassName("gist-snippet"); | |
for(i=0; i< snips.length; i++){ | |
var strvalue = ""; | |
var sniname = snips[i]; | |
var nn = $(sniname).find('.css-truncate-target'); | |
strvalue += "Title: " + $(nn).text().trim()+"\r\n"; | |
strvalue += "Link: "+ location.protocol+"//"+location.hostname+$(nn).parent().attr('href')+"\r\n"; |
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
<!-- Author: Shantha Kumar T --> | |
<!-- HTML snippet returns the collection of role definitions attached to the web --> | |
<!-- webroledefinitioans-rest-jQuery.html - Role definitins associated to the web --> | |
<!-- Style required for HTML Snippet --> | |
<style type="text/css"> | |
.tbl-roles th{ background-color:#ddd; border:2px solid #fff; text-align:left} | |
.tbl-roles td{ background-color:#eee; border:2px solid #fff;} | |
.web-heading{ padding:2px;} | |
</style> | |
<!--Include jQuery library to perform dynamic html dom manipulation --> |