function Get-SPOWebs(){param( $Url = $(throw "Please provide a Site Collection Url"), $Credential = $(throw "Please provide a Credentials")) $context = New-Object Microsoft.SharePoint.Client.ClientContext($Url) $context.Credentials = $Credential $web = $context.Web ...
Showing posts with label SharePoint Online. Show all posts
Showing posts with label SharePoint Online. Show all posts
Thursday, March 18, 2021
Thursday, January 7, 2021
07
Jan
Created Add-in on SharePoint instance with following permission xml<AppPermissionRequests> <AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl"/> <AppPermissionRequest Scope="http://sharepoint/content/sitecollection"...
07
Jan
Break role inheritance for a List object and grant Full Control permissions for a current user var listTitle = 'Documents';var spCtx = SP.ClientContext.get_current();var list = spCtx.get_web().get_lists().getByTitle(listTitle); spCtx.load(list,'HasUniqueRoleAssignments'); spCtx.executeQueryAsync( ...
07
Jan
SP Online site stored in Documents, When we trying to adding/retrieving documents but in the delete flow If you get an error during retrieval of a File object.var relativeUrl = "/sites/documentsite/Documents/images.jpg";
we have to specific or construct the full U...
List docs = web.Lists.GetByTitle("DOCUMENTS");Microsoft.SharePoint.Client.File uploadFile = docs.RootFolder.Files.Add(newFile);clientContext.ExecuteQuery();clientContext.Load(uploadFile.ListItemAllFields, item => item["EncodedAbsUrl"]);clientContext.ExecuteQuery();var fileUrl = uploadFile.ListItemAllFields["EncodedAbsUrl"].ToString();string...
Wednesday, January 6, 2021
Login your Office 365 account.Go to the SharePoint admin center.Select Settings.Under Custom Script choose:Prevent users from running custom script on personal sites or Allow users to run custom script on personal sites.Prevent users from running custom script on user created sites or Allow users to run custom script...