Posts

Showing posts with the label SharePoint

SharePoint Realm - Should it always be a GUID or can it be any string?

Image
SharePoint Realm is one of those things that is not discussed a lot in the SharePoint world, at least not until you are discussing oAuth and trust. In majority of cases, we are content with the default Realm ID that is set when we install SharePoint. What if some SharePoint administrator thought that it was perhaps cool to change the realm from GUID to any random string? Don't think its possible? Of course it is, just look closely at the Set-SPAuthenticationRealm cmdlet. Set-SPAuthenticationRealm [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Realm <String>] [-ServiceContext <SPServiceContextPipeBind>] [-WhatIf] [<CommonParameters>] Attribute Realm is a string and it allows an administrator to choose any string of his liking to be the new Realm ID. I just finished troubleshooting for a customer where the customer was unable to run any of the full-trust add-ins that they had on a new farm they had setup. The add-in

Permanently delete SharePoint Online Site-Collection

For SharePoint administrators, there was quite a radical change with the introduction of O365/SharePoint Online. One of the biggest changes for them were the limitations to the Administration Portal. The Central Admin allowed admins perform a plethora of admin tasks which were either not anymore allowed or were no longer available via the UI. Of course many admins did prefer the PowerShell route, some tasks were just easier via the UI. One such task that I have seen most admins perform via the UI was the deletion of a site-collection including the recycle bin. This is commonly done when a site provision failed and the same site needed to be provisioned again. However, deleting a site-collection was not enough. It was still in the recycle bin, and SharePoint was always smart to prevent you from creating another site-collection while a site with the same URL was present in the Recycle Bin. In on-premises, it is possible for admins to access the Recycle Bin via CA and delete the site

Quirks of uploading aspx files to a document library using SharePoint REST API

Uploading a file to a SharePoint document library using the SharePoint REST API can be very straight forward. Fast forward to  Microsoft Docs  and you are presented with all the information you need. A simple construct: Create a file and add it to a folder url : http : //site url/_api/web/GetFolderByServerRelativeUrl('/Folder Name')/Files/add(url='a.txt',overwrite=true) method : POST body : "Contents of file" Headers : Authorization : "Bearer " + accessToken X - RequestDigest : form digest value content - length : length of post body Update a file by using the PUT method url : http : //site url/_api/web/GetFileByServerRelativeUrl('/Folder Name/file name')/$value method : POST body : "Contents of file." Headers : Authorization : "Bearer " + accessToken X - RequestDigest : form digest value X - HTTP - Method : "PUT" content - length : length of post b