Exercise - Understand environments in Power Apps

Completed

Inside of a tenant, usually at the company or organization level, reside environments. An environment is a container for apps and other resources, such as data connections and flows from Power Automate. It's a way for an organization to group items based on business requirements.

Screenshot of Microsoft Power Platform environments.

If you've followed along with this module, you've been working in a specific environment the whole time. In the upper-right corner of the Power Apps studio, you can view your current environment. If you look just below the word "Environment," you can see which environment you're working in. In the example below, the user is working in the Environment called "Contoso Development".

Screenshot of the environment menu.

If you're new to Microsoft Power Apps, you might have only the default environment at this point. To see if there are other environments available, select the current environment name in the header. When you do a Select environment panel appears on the right side of your screen, enabling you to search for and choose another environment.

Note

If you want to work with Power Apps environments, you need a Power Apps Per app plan or Power Apps Per user plan. Additionally, if you want to work with Dynamics 365 restricted tables, you must have a Power Apps for Dynamics 365 license. See the references in the summary unit of this training module for a link.

Reasons to use environments

Reasons to create environments beyond the default one include:

  • Separate app development by department - In a large organization, each department can work in a different environment. That way, department employees see only apps and company data that are appropriate to their needs.

  • To support application lifecycle management (ALM) - Separate environments let you separate apps that are in development stages from ones that have already been shared. Common options include environments for development, testing, and production. Additionally, you might want to use a trial environment so that you can receive feedback from employees before publishing the final app.

  • Manage data access - Each environment can have its own source of business data. Data connections can be made that are specific to an environment and can't be shared across environments.

Note

Keep in mind that environments are relevant only to app creators and Power Apps admins. When you share an app with users, those users simply run the app, providing they have the correct permissions. In other words, they don't have to worry about what environment the app came from.

Types of environments

When you create a new environment, there are options for the type including the following:

  • Developer - created by users with Developer Plan licensing. For use by the creating user. Available without expiration as long as the user actively uses the environment. Developer environments include access to premium features.

  • Production - environment that includes apps/flows/data used for production. The Default environment is considered as a Production environment.

  • Trial - allows development/use/exploration of Power Platform features for short-term testing, designed for a single user. After 30-days, the environment is disabled and deleted.

  • Trial (subscription-based) - the second type of Trial environment. Tenant admins can license this type of environment to a group of users to develop larger, multiuser, and multiple-department solutions, and perform proof-of-concept reviews. Has an end date that can be extended.

  • Sandbox - a nonproduction environment of Microsoft Dataverse. It's isolated from production. Use this type of environment to develop and test app changes with low risk.

Now that you have a basic understanding of environments, we'll walk through an exercise of creating one.

Create an environment

Only an admin can create environments. If you aren't an admin, this information can still be helpful when you talk to your admin about setting up environments.

  1. From the Power Apps maker portal, select the gear (Settings) icon near the upper-right corner of the browser window and then select Admin center.

    This action creates a new browser tab for the Power Platform admin center. You can also go directly to https://admin.powerplatform.microsoft.com.

    Refer to the image below for the following steps. The numbers correspond to the numbered steps.

    Screenshot of steps to create an environment.

  2. From the Power Platform admin center home screen, select the Environments tab from the left-hand navigation panel. The screen changes to a list of all the Environments in your tenant. If you only have a single tenant, it will show up with a suffix of "(default)".

  3. Select + New from the command bar.

  4. In the New environment panel, which appears on the right side of your screen, enter a name for the environment and then select a region and an environment type.

  5. You have an option to add Dataverse to a Trial, Sandbox, or Production environment, toggle Add a Dataverse data store to Yes. This enables you to build apps with Dataverse data sources inside of the new environment. If you don't need Dataverse or Dynamics 365 in your new environment, you can leave it as No. Developer environments automatically include Dataverse.

  6. As an admin, you can also select the Pay-as-you-go with Azure which enables you to link the new environment to your Azure subscription, to pay for select Power Platform services such as Dataverse and Power Apps. This choice is optional, and it's only applicable for Production and Sandbox environments.

  7. If you're setting up a Developer environment for someone other than yourself, you'll see a Create on behalf toggle allowing you to assign the Developer environment to a selected Owner. With this setting, admins can create a Developer environment for users in their tenant.

  8. Select Save.

  9. For environments created with Dataverse (Sandbox, Production and Developer), the Add Dataverse panel appears once you select Save. Select the Language and Currency for the data that is stored in the database. You can't change the currency or language after the database is created. You can also have Dataverse create sample apps and data by selecting the Deploy sample apps and data toggle. Select Save once again to complete creation of the environment.

Note

There are tenant restrictions on capacity and environment creation. When you create an environment, you must have 1 GB available capacity or you cannot create a new environment. You will either have to free up space or purchase additional capacity for your tenant.

It might take several minutes to prepare the database for an environment including Dataverse. After the database is created, the new environment appears in the list of environments on the Environments list.

If you complete the steps above, you now have a new environment to work in. If you go back to the Power Apps home page, it will be available as an environment.

Manage access to an environment

By default, you can manage access to an environment in one of two ways:

  • System admin - A system admin has full permissions to create and manage environments.

  • Environment maker - An environment maker can view all apps in that environment, create apps, and work with Dataverse (other permissions apply).

Environment admins can create other security roles as needed. They can also add and assign users to these roles. Here are steps on how to assign security roles to individual users. This is done from the Power Platform admin center.

  1. Start by going to the Power Platform admin center https://admin.powerplatform.microsoft.com.

  2. Select Environments from the left-side navigation rail.

  3. Select the environment that you created, and then select Settings from the command bar.

  4. Select the Users + permissions dropdown and select Users.

    Screenshot of the settings.

  5. On the Users list for the environment, select Add user from the command bar.

  6. In the Add user panel on the right, input the user by entering a name or email address of the user in your organization.

  7. Select Add. After a few moments the Manage security roles panel appears.

    Note

    To be added to an environment, users must meet certain pre-requisites, such as being enabled in Microsoft Entra ID, having an active license, and being a member of the environment's security group. If you receive errors on any of these as you attempt to add a user, you will need to meet these prerequisites before attempting to add the user again. We will include a link in the summary unit for how to do this.

  8. In the Manage security roles panel, select the role(s) for the user. For this exercise, you can assign the user to the Environment Maker role.

  9. Select Save.

  10. The Users list will display notifications at the top letting you know that your user has been added and that security roles for them have been updated.

Now you have a basic understanding about Environments and the types of environments you can create by using the Power Platform admin center. We created an environment, then we added a user to our environment. With these skills, we can manage how users access environments.