This approach is a little more complex, but also the most flexible. The security roles are pre-assigned by a tenant Power Platform Administrator, or an Environment Maker/System Administrator of the environment.
In the Power Platform Admin Center against the particular environment, a team is created and a security group is assigned to the team. Security roles are also assigned to the team, so the members of the security group gain the team’s security role privileges.
Think of a team as an intermediate table between the security group and the security roles – which is pretty much exactly what it is.
The other concept that takes a bit of ‘getting your head around’ is that there is no need to add users to the team. The users are only added to the security group. The team is simply the means to connect the security group to multiple security roles.
Using this method, a Canvas App or Model-Driven App can be shared with a security group with pre-assigned security roles. It’s worth mentioning that when sharing a Canvas App with a security group, the sharer still has the option to add additional security roles. With a Model-Driven App, the sharer can also assign additional security roles, but only those security roles that have been assigned to the app. However, through creting a team, a security group can be assigned security roles that aren’t allocated to a model-driven app, and the app can still be shared with that group.
With a Dataverse team, the team is positioned between the security group and the security roles, as shown below.