A bit of context here … I was trying to create an environment in which to write an extension around workflows and notifications.
I needed 2 users, one to generate the document and the other one to receive the notification to approve it.
I decided to create a local Business Central sandbox and point my extension to this environment.
So I ran the New-NavContainer cmdlet as below
When I try to create the user as a local Windows user in the host, and in the Business Central sandbox the username gets translated into the SID for that Windows:
And after I logged as the new local user, launching BC sandbox Client it fails:
Then I’ve seen someone recommending to run New-NavContainerNewUser … so I gave it a try:
This is the issue and I have not been able to find a solution yet.
Create the sandbox with “-Auth NavUserPassword” like below:
You will be prompted for credentials of the first user (I named mine svi) when you run the script.
The cmdlet New-NavContainer will create among many other things, a sql login with sysadmin server role.
Once the script is finished, launch BC Sandbox client, use the credentials entered at installation and create a new user.
Now I have 2 users and can continue my tests on Workflows/Approvals:
If you have a solution for a local BC sandbox with Credential Type (-Auth param in New-NavContainer) set to Windows and the issue expressed in the title, please leave a comment with your solution.
Otherwise, I hope this workaround can help anyone with the same issue.