User access to App on sandbox

HI, I have deployed my app on sandbox. I have created an Administrator and an User on Sandbox by using the Anonymous User with Administrator rights. After switching off anonymous access I can not sign in by the created accounts. What hast to be done to generate accounts on sandbox? BR Alex
1 answers

Hey Alex,

I’m not sure why are you not able to log in to the created accounts, but did you consider creating the administrator account in an After Startup microflow (instead of having to deploy multiple times to get it ready)?

Go to Project ‘ProjectName’ > Settings > Runtime (tab) > After Startup (Select the microflow).
This microflow will run every time you start your App, and in that microflow, you can check if the administrator account exists (we do that by retrieving the user with name=’MxAdmin’), and you make sure that it is active. If it doesn’t exist, you create it and you set all required attributes and associations in that microflow. You can also reset its password.

You can use the same after startup microflow to initialize other system configurations as well.