The Build Application window has an option named "Embed the project Users and Groups in built server application". This setting causes the Settings folder of the project to be copied over to the built application. The settings folder contains the directory.json file which defines the application's users and groups.
Developers may run into an issue where enabling this setting does not cause the Settings folder to be copied over to the built application
By default this option is left unchecked. This is done to prevent the users and groups in a live application from being unintentionally overwritten. If the Build Application window is being used to update a live application with features from a testing version of the application and the option is enabled, then the test users and groups will overwrite the live users and groups.
To check if the setting is properly being copied over the Settings folder, developers can look at the package contents of their built server application. Under "/Contents/Server Database" there should be a folder named "Settings" with a "directory.json" file in it.
If the Settings folder and the directory.json file are absent, then the cause may be that there is no password assigned to the Designer in Toolbox.
Ensure that one has been assigned under Toolbox:
If this was the cause, then the Settings folder should be present after giving the Designer a password and rebuilding the application.
For more information about managing users and groups refer to this tech note.