Friday, February 5, 2016

SharePoint Workflow REST Call Failure

SharePoint Workflow Manager workflows allows creating workflows that communicate with the SharePoint objects through the REST API calls. End of the day a REST API is connected through the Client.svc endpoint of a particular site. Somehow there are situations I have experienced Cancellation of workflows due to the failures of REST calls. 

There are instances where when you make too many REST API calls, a 429 HTTP Status Code is returned. I have explained this in one of my previous articles here. That is a carefully handled scenario of the Client.svc.

Friday, January 15, 2016

WFInstanceManagementDB in Workflow Manager

WFInstanceManagementDB database plays a vital role in the SharePoint Workflow Manager workflows. This will maintain the list of instances that are being used by the Workflow Manager and associated related data. 

I could not find any recommended guidance for browsing and modifying these data in these workflows. So it is better do any operations associated with these databases with a possible risk in mind. I would not go and modify any of these databases.

But it will give an idea on how it is handled. Also it is not too complex.

Tuesday, January 5, 2016

Starting SharePoint Workflows with PowerShell

PowerShell is often used for many activities related to SharePoint. For any quick fixes around can be handled easily with PowerShell. Its no doubt Workflows are a vital part of SharePoint and with SharePoint 2013, they are not anymore in the SharePoint. 

Another important thing is that we often run SharePoint 2013 Management Shell as the administrator. But it is recommended not to use a SharePoint service account for running workflows. Well, it does not work. 

This makes starting a workflow tricky. We can get over with this through two tricky ways. One is granting another user with a Shell Admin permissions. But I would not recommend that. So the answer is simply impersonating a user. 

Monday, December 21, 2015

Sideloading SharePoint Add-Ins

If you are a SharePoint Add-in or App developer, you could have probably come through this issue atleast once. 

"Sideloading of apps is not enabled on this site."

Sideloading is a technique that most of the app vendors allow in order to test or debug the apps. In other words, it means deploying an app with a development tool rather than going through the correct secure procedure. Sideloading is available with all the smartphone platforms including Android. 

When you are developing a SharePoint Add-in, you need to test the Add-in prior to do a proper release. There is a default site collection template that is known as "Developer Site" which allows you to sideload add-ins from Visual Studio rather than putting it to an app catalog or online store. 

But if you attempt to deploy an add-in to another site with a different template, then you may encounter the issue which is highlighted above. Now we have two options. The preferred option is to change the deployment target to a developer site. 

Thursday, December 17, 2015

Automatic Index Management in SharePoint 2016

5,000 is a familiar number for anyone who had more than 5,000 records in a SharePoint list. List View threshold is something that many of us have faced and wanted to get rid of it by expanding. But then again we think about the best practices and the good it does. So, we often end up not increasing it, but creating some indexes on the columns. The problem is many of us did not know this can be done. Even I did not in the beginning. I am sure many of us still do not know. 

Microsoft has figured out there are many among us who do not do it and have introduced something that will make the job easy. The good thing is SharePoint can make note of every query we make and find the columns that need to be indexed.

This new feature is called Automatic Index Management. Here are some characteristics on it and how it functions.

What is Automatic Index Management?

It is a setting that is by default enabled for SharePoint lists from SharePoint 2016. It creates automatic indexes for the SharePoint lists by evaluating the queries and other concerns that matter most for improving the performances.

Thursday, November 26, 2015

MinRole in SharePoint 2016

We all have to make some tough decisions when making larger SharePoint environments. One of the toughest is which SharePoint services shall be running on which server. We would like our servers to be busy at same levels, but it is difficult to find the correct formula most of the times. Microsoft has been running SharePoint on online servers for a few years so far and with currently over 20,000 databases over 19 databases across the world, its unlikely there is anyone better who knows which services work well together other than Microsoft.

MinRoles are predefined types of server roles that that will maximize the optimization of SharePoint workloads across the servers. The good thing about MinRoles is that you can select it at the point of installation and change at some scenarios even sometime after the provisioning. As it is the SharePoint Server 2016 Beta 2 which is the latest release available, there are six predefined MinRoles.

Wednesday, November 25, 2015

SharePoint Workflow HTTP Unauthorized to...

This is an issue being discussed all over the internet and many articles suggest the number 1 fix for this as checking the existence of the user profile service and the user profile synchronization service as started. Also that is the best place to start looking into. 

In our case it was different. This was working well a few days ago and suddenly goes off without any notice. Now this is strange. The situation can be briefly summed up as this. 

  • Our domain controller is located in a separate network which is connected to this environment through a VPN.
  • I try to start the workflow through a PowerShell code. (Run as Administrator and impersonate the workflow start process to another user with necessary permission)
  • Workflow starts and display the following message in the status. 

Retrying last request. Next attempt scheduled in less than one minute. Details of last request: HTTP Unauthorized to http://sitename/_vti_bin/client.svc/web/lists/getbyid(guid'guid') Correlation Id: id Instance Id: id