
You've built your first Power App—a sleek canvas app that helps your marketing team track campaign performance. It's working beautifully in testing, but now comes the moment of truth: rolling it out to your organization. Suddenly, you're faced with questions that make your stomach drop. Who should see what data? Can interns access the same information as executives? What happens if someone accidentally deletes a critical record?
Power Apps security isn't just about keeping bad actors out—it's about creating a controlled environment where the right people have the right access to do their jobs effectively. Without proper security configuration, your brilliant app could become a liability, exposing sensitive data or allowing unintended modifications that could disrupt business operations.
By the end of this lesson, you'll understand how Power Apps security works from the ground up, and you'll be able to confidently deploy apps that protect your organization's data while empowering users to work efficiently.
What you'll learn:
You should be familiar with creating basic canvas apps in Power Apps and understand fundamental concepts like data sources, controls, and formulas. Some familiarity with Microsoft 365 administration concepts (like user groups and permissions) will be helpful but isn't required.
Power Apps security operates on multiple layers, each serving a specific purpose. Think of it like a building with multiple security checkpoints—you need clearance at each level to reach your destination.
The first layer is app-level security: who can even see and open your app. This is controlled through Power Apps sharing mechanisms and determines basic access to the application itself.
The second layer is data-level security: what information users can see, modify, or delete once they're inside the app. This is governed by the security settings of your underlying data sources, whether that's Dataverse, SharePoint, SQL Server, or another system.
The third layer is feature-level security: what actions users can perform within the app itself. This includes things like whether they can export data, access certain screens, or use specific functionality you've built.
These layers work together to create what security professionals call "defense in depth"—multiple barriers that protect your data and functionality. Let's explore each layer in detail.
When you create a Power App, you're initially the only person who can see and use it. Sharing an app makes it visible and accessible to other users in your organization. This is fundamentally different from traditional web applications where you might simply send someone a URL.
To share an app, navigate to Power Apps Studio and select your app from the Apps list. Click the Share button (it looks like a person with a plus sign). This opens the sharing panel where you can add specific users, security groups, or even share with your entire organization.
When you add a user or group, you'll see two permission levels:
Here's a critical distinction: sharing an app with "Can use" permissions doesn't automatically grant access to the app's data sources. If your app connects to a SharePoint list, for example, users need separate permissions to that SharePoint list. The app sharing only controls access to the application interface itself.
Rather than sharing apps with individual users, consider using Azure Active Directory security groups. This approach offers several advantages:
First, it simplifies ongoing management. Instead of remembering to add new marketing team members to five different apps, you add them to the "Marketing Team" security group once, and they automatically get access to all relevant applications.
Second, it reduces the risk of orphaned permissions. When someone leaves the organization, removing them from the appropriate security groups automatically revokes their access to all associated apps.
To use security groups effectively, work with your IT administrator to create groups that align with your business roles and responsibilities. Common patterns include department-based groups (Sales Team, HR Team), project-based groups (Project Alpha Users), or role-based groups (Regional Managers, Data Analysts).
App sharing gets users through the front door, but data permissions determine what they can actually do once they're inside. This is where many Power Apps implementations fail—developers focus on app functionality while overlooking the critical importance of data-level security.
If your app uses Dataverse as its data source, you'll work with Dataverse security roles to control data access. Dataverse security operates on a principle of least privilege combined with business unit hierarchy.
Security roles define what actions a user can perform on different types of data (called entities in Dataverse). Each role specifies four types of access for each entity:
These permissions operate at different organizational levels:
Consider a sales management app built on Dataverse. Your security model might include:
A "Sales Representative" role might have User-level Read and Write access to Opportunity records (they can see and edit their own opportunities), Business Unit-level Read access to Account records (they can see all customers their team works with), and no Delete access anywhere (preventing accidental data loss).
A "Sales Manager" role might have Business Unit-level access to all operations, allowing them to see and modify opportunities owned by their team members, plus Organization-level Read access for reporting purposes.
When your Power App connects to SharePoint lists, security follows SharePoint's permission model. SharePoint uses permission levels (like Edit, Contribute, Read) that combine multiple individual permissions.
The most common SharePoint permission levels for Power Apps scenarios are:
SharePoint permissions can be inherited from the parent site or customized for specific lists. When planning your Power Apps security, consider whether users need the same level of access to all data or whether different lists require different permission levels.
For apps connecting to SQL Server, Oracle, or other external databases, data security depends entirely on the database's native security model. Power Apps connects to these systems using service accounts or connection credentials, and the database permissions of those accounts determine what data your app can access.
This creates an important architectural decision: should you use a shared service account with broad database permissions and implement security logic within your Power App, or should you use individual database accounts that reflect each user's specific permissions?
The shared service account approach is simpler to implement but requires careful attention to app-level security controls. You'll need to build logic into your app that filters data and restricts actions based on the current user's identity and role.
Individual database accounts provide stronger security isolation but require more complex authentication setup and ongoing management.
Effective Power Apps security typically follows a role-based access control (RBAC) model where permissions are granted based on a user's job function rather than their individual identity. This approach scales better and reduces administrative overhead as your organization grows.
Start by identifying the distinct ways different groups of users interact with your app and its data. Avoid the temptation to create overly granular roles—too many roles become difficult to manage and understand.
Let's work through a realistic example: a project management app that tracks initiatives across your organization.
Project Contributors need to update task status and add time entries for projects they're assigned to. They should see project details and team member assignments but shouldn't access budget information or delete projects entirely.
Project Managers need broader access within their projects, including the ability to reassign tasks, modify timelines, and view budget information. They might also need read-only access to other projects for resource planning.
Portfolio Managers need high-level visibility across all projects, focusing on status summaries, resource allocation, and budget rollups. They typically don't need to modify individual tasks but might need to reallocate resources between projects.
System Administrators need comprehensive access for troubleshooting and data maintenance, but they shouldn't be making routine business changes to project data.
Each of these roles translates into specific permissions within your chosen data platform, whether that's Dataverse security roles, SharePoint permission levels, or database access controls.
Beyond data permissions, consider how your app's user interface should adapt based on the current user's role. Power Apps provides several functions that help implement role-based UI controls:
The User() function returns information about the current user, including their email address and full name. You can use this with lookup tables or conditional logic to determine what interface elements to display.
If(User().Email in ["manager1@company.com", "manager2@company.com"],
Visible,
Not Visible)
The IsInRole() function works specifically with Dataverse security roles, allowing you to show or hide controls based on the user's assigned roles:
If(IsInRole("Project Manager"),
DisplayMode.Edit,
DisplayMode.View)
For external data sources, you might maintain a separate configuration table that maps user identities to application roles, then reference this table throughout your app to control access:
If(LookUp(UserRoles, UserEmail = User().Email).Role = "Admin",
true,
false)
Role-based security often requires filtering the data that users see, not just controlling what they can edit. This is particularly important in apps that handle sensitive or confidential information.
Power Apps provides several approaches for implementing data filtering. The most straightforward is using the Filter() function with user-specific criteria:
Filter(Projects,
Owner.Email = User().Email ||
ProjectManager.Email = User().Email ||
User().Email in Split(TeamMembers.Email, ";"))
This formula shows projects where the current user is the owner, project manager, or listed as a team member. The filtering happens at the app level, so users never see data they shouldn't access.
For more complex scenarios, consider implementing server-side filtering through Dataverse views or database stored procedures. This approach improves performance by reducing the amount of data transferred to the app and provides an additional security layer at the data source level.
Let's implement a complete security model for a realistic scenario: an expense reporting app that handles different approval workflows based on expense amounts and user roles.
First, create a SharePoint list called "Expense Reports" with these columns:
Create a second SharePoint list called "User Roles" with these columns:
Set up SharePoint permissions to support your security model:
Navigate to your SharePoint site and access Site Settings → Site Permissions. Create custom permission levels:
Create SharePoint groups for each role:
Add appropriate users to each group based on their organizational roles.
Create a new canvas app and connect to both SharePoint lists. Implement role-based functionality:
On the app's OnStart property, establish the current user's role:
Set(CurrentUserRole,
LookUp('User Roles',
'User Email' = User().Email).Role);
Set(ApprovalLimit,
LookUp('User Roles',
'User Email' = User().Email).'Approval Limit')
Create a gallery that shows different expenses based on the user's role:
Switch(CurrentUserRole,
"Employee", Filter('Expense Reports', Submitter.Email = User().Email),
"Manager", Filter('Expense Reports',
Status.Value = "Pending Approval" &&
Amount <= ApprovalLimit ||
Approver.Email = User().Email),
"Finance", 'Expense Reports',
Filter('Expense Reports', Submitter.Email = User().Email))
Implement approval controls that only appear for appropriate users:
// Visible property of Approve button
CurrentUserRole in ["Manager", "Finance"] &&
ThisItem.Status.Value = "Pending Approval" &&
ThisItem.Amount <= ApprovalLimit &&
ThisItem.Submitter.Email <> User().Email
Add expense submission limits based on role:
// On Submit button
If(ExpenseAmountInput.Value > Switch(CurrentUserRole,
"Employee", 5000,
"Manager", 25000,
50000),
Notify("Expense amount exceeds your submission limit", Error),
SubmitForm(ExpenseForm))
Test your implementation with different user accounts:
Document any security gaps you discover and implement additional controls as needed.
The most frequent Power Apps security issue is users receiving "access denied" errors when trying to use an app they've been explicitly shared with. This almost always indicates a data permissions problem rather than an app sharing issue.
Start troubleshooting by checking the specific error message. "You don't have permission to access this app" suggests an app sharing problem—verify the user is included in your sharing configuration and that any security groups are properly configured.
"Forbidden" or "Access denied" errors when the app loads indicate data source permission issues. Verify that users have appropriate permissions to the underlying SharePoint lists, Dataverse tables, or other data sources your app uses.
For Dataverse apps, check that users have been assigned appropriate security roles and that those roles include the necessary permissions for all entities your app accesses. Remember that Dataverse security is additive—users get the combined permissions of all their assigned roles.
Implementing security through app-level filtering can create performance problems when working with large datasets. If your app is slow to load or becomes unresponsive during data operations, consider moving filtering to the server side.
For SharePoint data sources, create filtered views that implement security logic at the list level. Power Apps can connect to specific SharePoint views, reducing the amount of data transferred and processed.
For Dataverse, use server-side filtering through saved views or FetchXML queries. This approach leverages Dataverse's built-in security model and query optimization.
For SQL Server and other external sources, implement security filtering in stored procedures or database views rather than pulling all data into Power Apps for client-side filtering.
Many Power Apps connect to multiple related data sources—for example, a project app might use both a Projects list and a Tasks list in SharePoint. Ensure your security model is consistent across all related data sources.
Users who can see a project should typically be able to see its associated tasks, but users who can modify tasks might not be able to modify project-level information. Map out these relationships explicitly and implement consistent permissions across all data sources.
Consider using SharePoint site columns and content types to ensure consistent metadata and permissions across related lists. For Dataverse, leverage entity relationships and security role inheritance to maintain consistency.
When connecting to external data sources like SQL Server, avoid using highly privileged service accounts unless absolutely necessary. If your Power App connects using an account with database administrator privileges, all users effectively have admin access to your data, regardless of your app-level security controls.
Instead, create dedicated service accounts with minimal necessary permissions. For read-only scenarios, grant only SELECT permissions on required tables. For apps that need to write data, consider using stored procedures that implement business logic and security checks server-side.
Power Apps security is a multi-layered discipline that requires careful attention to both app sharing and data permissions. The key principle is defense in depth—implementing security controls at multiple levels to protect your organization's data and functionality.
Start with the data layer, ensuring that your underlying SharePoint lists, Dataverse tables, or database objects have appropriate permissions configured. Then layer on app-level controls that provide role-based user interfaces and business logic enforcement.
Remember that Power Apps security is not a one-time configuration task. As your organization changes, as people take on new roles, and as your apps evolve, you'll need to regularly review and update your security model to ensure it continues to meet your needs.
Your next steps should focus on implementing security from the beginning of your Power Apps projects rather than treating it as an afterthought. Design your data model with security in mind, plan your user roles early, and test your security implementation thoroughly before rolling out to production.
Consider exploring Power Platform Center of Excellence (CoE) tools, which provide governance and management capabilities for larger Power Apps deployments. These tools can help you monitor app usage, manage permissions at scale, and ensure consistent security practices across your organization.
Finally, stay current with Power Platform security features and best practices. Microsoft regularly introduces new security capabilities, and the threat landscape continues to evolve. Regular security reviews and updates will help ensure your Power Apps remain secure and compliant over time.
Learning Path: Canvas Apps 101