Posts

Intermittent Format of the initialization string does not conform to specification starting at index error

If you are experiencing intermittent failures with task notifications or email events—specifically the error Format of the initialization string does not conform to specification starting at index —but find that retries eventually succeed, it likely indicates a version mismatch. This occurs when Nintex Automation (K2) is running in a multi-server farm configuration where Fix Pack levels are inconsistent across nodes. How to Resolve: Verify Versions: Navigate to [Your-K2-Base-URL]/autodiscover/updates to check the current update status of each server. Synchronize: Ensure all servers are on the same Fix Pack level. If a mismatch is found, apply the missing Fix Pack or re-run the latest update across the entire farm to ensure uniformity.

K2 upgrade script SourceCode.Data.5.1007.1000.0.PostUpgrade.sql failure

During an upgrade, the execution of the  SourceCode.Data.5.1007.1000.0.PostUpgrade.sql script fails with: ExecuteSqlScript.Execute: Logged Error: Script execute failed: System.Exception: Script execution exception: System.Data.SqlClient.SqlException (0x80131904): Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0.    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)    at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)    at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String ...

Access denied. You do not have permission to perform this action or access this resource.

Image
If you are seeing the below errors in one site collection, but it is working in another: Access denied. You do not have permission to perform this action or access this resource. Thread 1: Access denied. You do not have permission to perform this action or access this resource. K2 for SharePoint Configuration Not Completed The app you're trying to reach has been removed from this site. Do you have multiple SharePoint Web Applications with multiple App Catalog site?  Is the K2 for SharePoint app deployed to multiple app catalog sites? If you do, you must deploy the app to the (All Paths) Managed Paths to resolve the issue as per: https://help.nintex.com/en-US/k2five/UserGuide/current/Content/K2-for-SharePoint/AddAppMultiAppCat.htm Special Consideration: If you navigate to manage app deployment and delete the app installation's deployment data, make sure to click OK and retrust the app even if you do not make any changes; otherwise cancelling out will cause this error in all we...

Nintex Automation K2 Five for SharePoint Sorry, you don't have permissions to add apps here

Image
When trying to add the K2 Five for SharePoint app to your app catalog site, you see the following warning and it won't allow you to add the app: Sorry, you don't have permissions to add apps here. Although, the environment have already been setup to support apps as per: https://learn.microsoft.com/en-us/sharepoint/administration/configure-an-environment-for-apps-for-sharepoint And the account in question is a farm administrator as well as site collection administrator. For SharePoint apps/add-ins, the ' Create Subsites ' User Permissions for Web Application is needed to add apps/add-ins.   To keep your main site ("Host Web") clean and secure, SharePoint uses a "shadow" site called the Add-in Web .   Because the Add-in Web is technically a child site, the user installing the add-in must have the Create Subsites right. Without it, SharePoint doesn't have the authority to provision that hidden sub-site infrastructure. Grant Create Subsites User Per...

Intermittent The request was not authenticated. Click here to re-authenticate. error

Image
If you are intermittently seeing this error pop up, is there an F5 load balancer involved? The request was not authenticated.  Click here to re-authenticate. The F5 may be blocking AjaxCall.ashx requests and returning a 200 Status code instead if the call is hitting a POST Data Length limit configured on the F5 or if the AjaxCall.ashx SmartObject call results in a 500 error. Fix: - Increasing the POST Data Length limit on the F5 if applicable - Temporarily disable the iRule that may be masking the 500 error with the 200 response; this may show what the actual SmartObject error is to be resolved - Enabling HostServer Logging and SmartObject logging may also help you to debug if temporarily disabling the iRule or debugging the F5 is not possible

Fix: K2 Legacy Apps Error "Application does not have permissions to upload pages"

If you are running SharePoint Server Subscription Edition (SE) with the K2 Legacy Apps add-in model, you might run into a frustrating roadblock during site activation. A common error message many admins encounter is: "The application does not have permissions to upload pages for rendering SmartForms in SharePoint." This issue isn’t unique to on-premises environments; it behaves identically to a known limitation in SharePoint Online regarding "Custom Script" permissions. Here is why it happens and how to fix it using PowerShell. Why is this happening? By default, modern SharePoint site collections often have a security setting enabled called the DenyPermissionsMask . Specifically, the flag for AddAndCustomizePages is frequently blocked. Because K2 needs to upload specific pages to your SharePoint site to render SmartForms, this security restriction blocks the app from completing the deployment. To get past this, we need to temporarily lift the restriction, activat...

Steps to repair K2 certificates

  Overview of K2 Certificates and Configuration Service K2 uses several certificates critical for its operations. Starting with version 5.3, the introduction of the K2 Configuration Service added the requirement for additional certificates to run correctly. These certificates are typically installed automatically during K2 installation. However, corruption or improper installation can occur, causing issues such as the K2 Configuration Service failing to start with certificate-related errors in the logs. When such issues arise, the recommended approach is to perform a repair process to regenerate the necessary certificates. Step-by-Step Instructions to Repair K2 Certificates Backup the K2 Database Before any modification, ensure a full backup of the K2 database is taken to prevent data loss. Access the K2 Server Log in to the K2 server using the K2 service account credentials. Open Microsoft Management Console (MMC) Launch mmc.exe . Add the follow...

Quick Fix: Update K2 Workflow Data Fields with PowerShell (When GoToActivity Isn't an Option)

Sometimes, you'll encounter a situation where a workflow variable or process instance data field has an incorrect value. Maybe the data source failed, or there was a data entry error. While a "GoToActivity" might seem like the obvious solution, what if fixing the data source isn't feasible or you need a more direct approach? Fear not! You can leverage the power of PowerShell to directly update these values without resorting to complex workflow manipulations. Let's walk through how to do this efficiently. Why PowerShell? PowerShell provides a scripting environment that allows you to interact directly with the K2 workflow engine. This enables you to programmatically modify data fields in running process instances, giving you granular control over your workflows. The Script Here's the PowerShell script you can use to update a data field: # Requires the SourceCode.Workflow.Client assembly to be loaded. # You might need to adjust the path to the assembly. Add-...

NAC/Nintex Forms for Office365 isMemberOfGroup function

Image
Do you need to show or hide certain controls/group of controls on a Form base on the current user's SharePoint group membership?  If so, you can use the isMemberOfGroup("GroupName") function to do so.  One method of implementation: Use a checkbox control to store the result of this function, as it will return true or  false.  Hide the checkbox control Function takes SharePoint Group Name, and return either true or false. Create Form rule that evaluate the hidden checkbox control with the true/false result, show/hide controls or group of controls as desired.

Getting WorkflowID or ProcessInstanceID from SerialNo Parameter

Image
 

Upgrading to K2 Nintex Automation 5.8

Image
With the release of K2 Nintex Automation 5.8, it is now only supported if you upgrade from version 5.6 or 5.7. So if you are upgrading from an earlier release like 4.7 or 5.3, you will have to upgrade to 5.6 or 5.7 first.  I.e. 4.7 -> 5.7 -> 5.8

401 Unauthorized on last step Application of Registration Wizard

You've been using K2 for SharePoint smoothly, but recently started encountering "401 Unauthorized" errors with SharePoint SmartObjects and even during the Registration Wizard's final "Application" step. This could be caused by an expired K2 OAuth High Trust certificate. To renew the certificate, follow the steps here: https://community.nintex.com/k2-blackpearl-66/when-trying-to-add-the-url-on-appdeployment-exe-an-error-appears-3002?tid=3002&fid=66

Block Unauthorized K2 Cloud Users from being assigned a License

Image
When a user incidentally browse to any K2 pages/resources, they will be allocated a license; even though they were not meant to have access to K2. To prevent this, you can enable the 'Assignment required?' option on your K2 for Office 365 Enterprise application. Make sure to Save the change. Then users or groups who should have access to K2 can be added via 'Users and groups'. Users who were not allowed via 'Users and groups' will see the following page, preventing them from logging in and so a K2 license won't be allocated.

Hyperlink or Picture column in SharePoint

Image
When working with Hyperlink or Picture columns in SharePoint, SmartObjects will only have a single field. To directly display the URL in SharePoint, simply enter it into the field. For a more user-friendly display, enter the URL followed by a comma and the desired display text. This will replace the link with the specified text while maintaining the underlying URL.

.config files backup post upgrade comparisons

Image
When upgrading K2, .config files are usually backed up to the %temp%\K2 Backup folder before they are upgraded.  If you need to compare or extract custom configurations/settings from previous .config files, they can be found in this K2 Backup directory.

Getting 404 error when accessing SmartObject Odata endpoint

Having trouble accessing your newly created OData endpoint? This guide addresses the 404 error you might encounter when trying to reach a new SmartObject exposed as an OData endpoint after setting it up through K2 Management. Steps: Create the OData endpoint: Go to K2 Management and navigate to Integration > APIs > SmartObject Odata. Add a new SmartObject and configure it as an OData endpoint. Apply the changes. Access the endpoint: Try reaching the endpoint using the following URL format:  https://[KUIDorVanityValue].onk2.com/api/odatav4/v4/cars  (Replace  [KUIDorVanityValue]  with your actual K2 Cloud URL or vanity value).  You may experience an HTTP 404 error. Resolve the 404 error: If you encounter a 404 error, it might be necessary to refresh the endpoint. Use this URL to refresh the endpoint:  https://[KUIDorVanityValue].onk2.com/api/odatav4/op/refresh Once refreshed, you should be able to access your new OData endpoint using the original URL. N...

Blocking Error during K2 5.6 Server migration

  Error Encountered: Error during K2 5.6 migration to a new machine, keeping the SQL server unchanged. Error message:                       20:49:59:>> Certificates.FindCertificate: Found 1 certificates                       20:49:59:>> RegisterShard.Execute: Adding additonal connection string parameters to config service shard                       20:49:59:>> AdditionalConnectionStringParameters.AmendSQLConnectionString: Additional connection string parameter value: empty                       20:49:59:>> AdditionalConnectionStringParameters.AmendSQLConnectionString: Additional ConnectionString Parameters is empty                       20:50:04:>> AnalyzableAction.PopulateValidate...

Client Credentials flow with K2 Cloud with Odata, Workflow REST or SCIM

Image
This guide outlines the steps to using the Client Credentials Flow for accessing Nintex K2 Cloud's OData, Workflow REST, or SCIM APIs. Before you begin: Ensure your environment is eligible for Client Credentials Flow by contacting Nintex support ( https://customer.nintex.com/cases/Pages/default.aspx ). Have a SHA256 hash of the client secret of your choosing ready. Steps: Onboarding: Open a support ticket with Nintex requesting the onboarding of the Client Credentials Flow for your environment. Provide the SHA256 hash of your the client secret. https://help.nintex.com/en-US/k2cloud/userguide/current/Content/IdProviders/ClientCredentials.htm You can Generate the secret hash from a Client Secret value in a .NET console application. The onboarding team does not need the actual secret value, only the hash of it. Use the following steps and code example to generate the hash: Add the  IdentityModel  NuGet package. Add the  IdentityModel  library reference in the ...