Symptoms
401 Unauthorized: Access id denied due to invalid credentials
Diagnoses
We discovered that this is due to the use of single "/runtime" on K2 smartforms URL when registering the K2 app in SharePoint.
Resolution
There are two ways on how this can be resolved.
Solution _1. Re-run K2 app registration wizard and ensure that you use double runtime on your URL - i.e. "/runtime/runtime".
Solution _2:
- Change Environment field of Smartforms Runtime to URL/Runtime/Runtime (I did it via Workspace)
- IIS restart
- K2 service restart
- Re-ran the registration wizard (you can use just one runtime here).
- Reset all forms back to default SharePoint via the Form settings
- Clear IE cache or better use Firefox or Chrome
- Set forms back to K2 smartforms via the Form settings