Connecting to SharePoint using WebDav in Windows 10 – User has not been authenticated

Issue

When trying to access SharePoint via WebDav available at UNC   \\server@SSL\davWWWroot\  using a Windows 10 client I got the following error

This is due to Windows 10 requiring an entry in the registry named AuthForwardServerList.

Solution

Add the registry key specified in the “Registry information” part of hotfix 943280. I only had to add the registry key and restart the WebClient service on my Windows 10 client to make it work.

PowerShell and SharePoint REST – Unable to translate bytes from specified code page to Unicode

Intro

I recently had to transfer a large amount of CSV lines to a SharePoint list and decided that the PowerShell command Invoke-WebRequest and the SharePoint REST API would be a good match to get this done.

I build a PSObject for each CSV line as in

And then convert that to JSON when posting as in

Issue

Everything was going great until I hit some values containing the Danish characters æ,ø, and å. SharePoint threw a fit and returned the error

Solution

Use [System.Text.UTF8Encoding]  to get the bytes in UTF-8 encoding and post that

Hope this helps someone 🙂

 

SharePoint – JSLink – Notes

Requirements

  • If JS Link file is placed in Style Library: Check in JS Link file to allow user’s access to the file.

JS Link path

jslink.js content

 

Visual Studio + Angular CLI – Cannot find name

After updating to the latest Angular CLI (RC0) and TypeScript tools for Visual Studio to (2.2.1) I started getting a LOT of errors like the following:

In files like

Solution

Add “dom” to “lib” tsconfig.json after creating a new project with Angular CLI as in

Hope this helps someone 🙂

List SPNS in Active Directory

Short script found on social.technet.microsoft.com. Please follow the link for further info.

 

SharePoint 2013 – Enable Ratings on a list programatically via the REST API

I have searched a lot and been through much trial and error trying to get this to work. So I thought it might benefit someone if I share it.

For this article it is assumed that you are used to working with the SharePoint REST API. If not, MSDN has a lot of great articles with examples on this. Make sure to also include the X-RequestDigest  header when sending POSTs to SharePoint (Google “SharePoint X-RequestDigest REST POST” for more info – or let me know if this needs elaboration :)).

1 Create a list

Use the REST API or whatever method you prefer. See the Create a list example at MSDN for an example on how to do it via the REST API.

2 Create the needed fields

In order to specify the field IDs and FieldRefs while creating the fields via REST, we are going to be using the createfieldasxml method located at http://<site url>/_api/web/lists/GetByTitle('LISTTITLE')/fields/createfieldasxml . We need to POST the following data in order to create a field. I have included the needed XML for each field in the Field list below. Do 1 post for each field changing the XML FROM THE FIELD LIST BELOW to the XML for the field.

Field list

3 Set the Ratings_VotingExperience property on the list

This is done by posting the following data to  http://<site url>/_vti_bin/client.svc/ProcessQuery . Change the LISTTITLE to the title of your list.

And you are done. The list now has Likes enabled.

This article was written in a short amount of time and therefore, is not very elaborate. Please let me know if it needs more examples or further explanations.

Happy coding 🙂

Visual Studio 2015 & Angular-CLI – Cannot find namespace ‘webdriver’

I recently got the following error in Visual Studio 2015 while working on a project generated by Angular-CLI (1.0.0-beta.21).

Solution was to install Selenium package and Selenium-Webdriver types using the following command

Hopefully this may help someone else searching Google 🙂

Sync Office 365 shared calendar with IOS and Android

After signing up for Office 365 and setting everything up on 2 computers, phones and tablets, I were very surprised to find that IOS and Android is not able to display calendars shared from Office 365.

There are some work arounds involving the OWA app (not as intuitive as using the native calendar app), publishing the calendar (making it available for all who has the link) or setting up a joined shared calendar (not as user friendly due to having to use 2 calendars, and also not able to differentiate the calendar entries by color).

The solution: Install Team Calendar Sync on the IOS / Android devices that needs to access the shared calendars. This will sync the shared calendars allowing the user to displaying it as any other native calendar. It does cost around 7 Euros, but that is certainly worth the cost until Microsoft and IOS / Android becomes better friends.