Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Blogs / Dvlprlife.com / Real things I’m asked – Add...

Real things I’m asked – Add Test Users to a Business Central Docker Container

Brad_P Profile Picture Brad_P 1,542

Q: How do I add test users to a Microsoft Dynamics 365 Business Central Docker Container?

A: You use the Setup-BcContainerTestUsers function in BCContainerHelper to load test users.

You can load either Essential or Premium users with the Setup-BcContainerTestUsers function.

When working with a Business Central Container that has the following Users:

New test users can be added with the Setup-BcContainerTestUsers function:

#set the userName, password and containerName values for your use
$userName = 'admin'
$password = 'password'
$containerName = 'your container'
$securePassword = ConvertTo-SecureString $Password -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential ($userName, $securePassword)


# the $SecurePassword is the password  that the new test users will use when logging into Business Central
Setup-BcContainerTestUsers -containerName $containerName -select Essential -Password $securePassword -credential $Credential
Setup-BcContainerTestUsers -containerName $containerName -select Premium -Password $securePassword -credential $Credential  

After setting up the test users with the Setup-BcContainerTestUsers function in BCContainerHelper:

The new TestUsers can access the system using the password used in the Password parameter.

Note: You need to specify credentials when not using Windows Authentication.
The code and information discussed in this article are for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central 2022 Wave 2 online and BCContainerHelper Version 4.0.8. 


This was originally posted here.

Comments

*This post is locked for comments