The type or namespace WorkflowServicesManager could not be found an error in csom SharePoint Online

This SharePoint tutorial, we will discuss how to resolve an error The type or namespace WorkflowServicesManager could not be found in SharePoint.

The error comes in a console application developed to work with workflows in SharePoint Online. In that online, I was trying to retrieve workflows presented on the site.

The code was like below:

using (ClientContext ctx = new ClientContext(URL))
{
ctx.AuthenticationMode = ClientAuthenticationMode.Default;
ctx.Credentials = new SharePointOnlineCredentials(GetSPOAccountName(), GetSPOSecureStringPassword());
ctx.Load(ctx.Web);
ctx.ExecuteQuery();
var workflowServicesManager = new WorkflowServicesManager(ctx, ctx.Web);
}

But it gave an error in the below line:

var workflowServicesManager = new WorkflowServicesManager(ctx, ctx.Web);

The error looks like:

The type or namespace WorkflowServicesManager could not be found (are you missing a using directive or an assembly reference?).

The type or namespace WorkflowServicesManager could not be found sharePoint csom

The type or namespace WorkflowServicesManager could not be found

We need to add the Microsoft.SharePoint.Client.WorkflowServices.dll inside our console application. We can add the dll reference from NuGet.

Right-click on References folder in the solution explorer -> Manage NuGet Packages….

The type or namespace WorkflowServicesManager could not be found sharepoint

Then in the NuGet Package Manager search for “Microsoft.SharePoint.Client.WorkflowServices” and then Install like below:

The type or namespace WorkflowServicesManager could not be found

Once successfully installed the dll, you should be able to add the using statement like below:

using Microsoft.SharePoint.Client.WorkflowServices;

You may like following SharePoint workflow tutorials:

This SharePoint tutorial, we learn how to fix error The type or namespace WorkflowServicesManager could not be found which comes while working with csom in SharePoint Online.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

>