Part of a sound enterprise governance strategy is creating non-default environments. Why? Well one reason is Application Lifecycle Management (ALM). Other than this guy, should you really be testing your code in production? Probably not.
Naturally there will be circumstances where you have your apps and flows running in the default environment. I would argue, that using the default environment for personal productivity is a reasonable practice. But, as soon as you have users, other than yourself, you really should be moving these assets to a Test environment and ultimately a Production environment. One thing that people struggle with is managing users and access when they move their apps and flows to another environment. Using Azure Active Directory groups is a great start, but you can’t assign a group to an environment. We can manually add users through the admin centers, but once again that is a manual activity.
I recently found a way to solve this problem by automating it using Power Automate and the Power Platform Management connector by using the Force Sync User operation.
I have documented this solution on YouTube and you can watch it below: