Are you outgrowing SharePoint as a data store for your application and not ready to pay for Dataverse? Try using Dataverse for Teams instead so you can move past SharePoint's limitations all without paying for an extra subscription.
We’ve talked in previous posts about what it means to use Environments in the Power Platform. We’ve discussed why and how you might use an environment to support things like application lifecycles, secure data boundaries, etc. Today, we’re going to talk about what it means to build Power Apps inside of a Teams environment.
Teams environments is similar to environments we’ve talked about previously. But there are differences so let’s talk about these first.
First, security is managed from the team. When using a Power Platform environment within the context of a team, you’re essentially going to be building applications specifically for the people on the team. So managing who can access apps built in a Teams environment is done simply using the Owner, Member, Visitor roles for your team. If you find yourself in the Power Platform Admin Center, you can manage settings for a Teams environment, but it’s very stripped down so you do not have the granular control over roles, users and permissions in the environment.
A second implication of apps built in Teams environments is that Teams environments do not appear in your list of environments when in Power Apps. I did notice that they appear when in Power Automate, but I suspect this to be short lived. It’s probably there either because Microsoft didn’t get to that feature yet, or there is some backdoor needed to access or manage flows related to a Teams environment, that is not available yet within the Teams app. This also means that apps created in a Teams environment are not listed as apps in Power Apps. That said you can access a Teams environment app directly using a web browser but you won’t be able to use integration with Teams proper.
Last but not least, and probably the biggest benefit is that you get Dataverse for Teams. Specifically, you get a Dataverse database that you can use to build your app’s data structure. You can use the out of the box entities that come with the Dataverse for Teams and you can extend this as well with entities that support your app and use cases. This is a nice option to get a reliable cloud data for free without the delegation related limitations imposed when using the other free cloud data option, SharePoint. If your app can live within a Team, this is great for you!
So if you don’t already have a target team for this, you’ll want to create a new one. Once you have a team, you’ll want to open the Teams app and add the Power Apps app to the bar on the left.
Tip: Don’t get confused and add Power Apps as a tab at the top. This will simply give you an option to select from “standalone” apps that exist in your default environment.
Now that you’ve got Power Apps in your left bar you should see options to get started or create a New app.
You’ll be given a choice of which team to build this app for. If you select one that does not already have a Dataverse for Teams environment, one will be created for you. Be patient, this might take a few minutes.
Once this completes you might notice a notification in your activity feed. So if you don’t have time to wait around for a few minutes, this is just a nice little way to know it’s ready.
Next you’ll be transported to the Power Apps studio (for Teams) and asked to provide a name for your application.
Now, we’re ready to build something. The first choice we’re faced with is how we’d like to build our first screen. We are presented with options With data or With layout.
I find this a little interesting because this choice is largely absent from the standard Canvas App creation experience. Clearly it’s a good idea to provide the option given that we have free Dataverse in this world, but I can see value in having this option for Canvas Apps.
The really nice thing about the With data option in the Teams environment is that once you have your Dataverse entities to choose from, it will automatically place controls on the screen related to your entity in a way that is useful. It’s just a great place to start.
So let’s create something in Dataverse to use in our app. If it’s the first time you’re creating an app in a Teams environment, Dataverse has yet to be provisioned. In the Data Source panel, you’ll see an option to Create a table to set up your database.
Once you have a Dataverse database in your environment, you’ll see all of the options you’d expect for connectors. And any Dataverse tables readily available. And again, we have an option to Create a new table.
Let’s go ahead and create a new entity/table called `Account`.
Once ready we get to define columns for the Account entity. In this case we’ll just rename the `Name` column to `Company Name`. Note the little red asterisk, indicating this is a required field. Also note that this field is the Primary column on the table. You can see this by clicking `Edit table properties`.
Next let’s create a Contact table. We’ll add Email, Mobile Number, along with fields for an Address. Finally, we will add a Lookup Column to the Account table.
Now that we have a couple entities, let’s get back into our app and use the With Data option on our first screen. I’m going to rename my screen to `AccountScreen` and use the With data option to add the Account entity to my screen.
Check out how great that is. It automatically added an Account list on the left, the view/form in the middle, along with options for creating a New record, Edit and Delete.
Now let’s play the app quick and add some accounts.
Alright, so next let’s do the same thing, follow the steps we completed for Accounts and create a new `ContactScreen`. Use the With data option to add the Contacts entity, then play the app to create contacts.
Now we can do things like add additional buttons or components for navigating between screens. Or anything else your app needs and we’re ready to publish this app.
Now let’s figure out how to make this available in our team. This really is quite simple. If you look in the upper right corner of the Power Apps studio you’ll see some familiar icons like App Checker and the Play button. But notice we have a few new options here that are different from Power Apps Studio for Canvas Apps.
The first thing I’ll point out is the save icon. This is nice, we have an option to Save along with Save and Publish right here with us while we’re building our app screens.
The second thing I’ll point out is the option to Publish to Teams right next to the Save icon. Click this and you’ll be guided through the process to save, publish, and place a tab within your team for this new app.
Once saved, you will be prompted to Publish your application.
Now select where you would like a Tab for your application to appear. In this case we’re simply going to add it to the General channel. Click `Save and close`.
And here is what our app looks like within our team.
Alright, that’s a quick walkthrough of what it looks like to build a Power App in a Teams environment. This is such a great tool in the business apps arsenal for any organization. These apps are accessible anywhere from any device, authenticated, and secure through Microsoft Teams.
You can save time by building data first applications and keep the flexibility of Canvas apps if you need it. And greatest of all, your base Office 365 license covers all of this. This means members of your team can use this app, with Dataverse for free. Depending on your needs, your app could live within the Teams Environment permanently, or you could use this strategy to validate your use case for Dataverse prior to growing into a full Dataverse Environment that increases cost for the business.
One last thing I want to share is a quick reference article about Dataverse for Teams… About the Microsoft Dataverse for Teams environment - Power Platform | Microsoft Docs