Usual process of managing permission on Power Apps is multi-step process and can be done only by app owner, which ends leaving some dependency on the owner or on developer. To avoid such scenario in one of my projects, I decided to design the my apps permission in such a way that business users can manage it directly from Teams.
To cover this topic, I’ll be taking up one of the most common development scenarios in Microsoft Office 365 nowadays i.e. using Microsoft Power Apps with SharePoint Online as this involves two services having individual permission management system.
Following steps will guide you on how to setup a permission management process where if business owner adds a user to the team in Microsoft Teams, he/she automatically get access to the Power App and associated SharePoint site.
Now assuming we have already developed a Power
Management App” using SharePoint site “Project Management Site” to store data.
- Create a team in Microsoft Teams – named as “Project Management” – Whenever you create a new team in the backend an Office 365 group is created for the same in Azure Active Directory. But by default, the security is disabled for that group so that will not show up in the share screen of your Power App but will be accessible in SharePoint.
- Get the Object ID of our team from Azure Active Directory – Go to Azure Portal > Azure Active Directory > Groups > All Groups > Search with your team name “Project Management” > Copy Object ID
- Connect to Azure AD using PowerShell – run command “Connect-AzureAD” as shown. It will prompt you to login, make sure that the account with which you are logging in has owner rights on the team you created, as in our case “Project Management” team.
- Enable security on your teams [Office 365] group – <ObjectID> will the id obtained in 2nd step.
- Use the following command to enable the security for your team
- Now, use the get command to verify the change done in Step 1
- Final Step, give your teams group access on Power Apps & SharePoint – Now after enabling the security your teams group will be visible in both Power Apps and SharePoint. <<Note in SharePoint the group name will appear as “[Group Name] Members”.>>
Voilà ! Now if you add user to your team as member or owners, they will automatically get access to your Power Apps application and SharePoint.
May the POWER be with you! 🙂