cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Restricting edit functions and screen access

Hi, Microsoft Community.

 

I want to know if there is a way to limit screen access to an specific number of users.

 

The problem is that I have created an app from powerApps, but I need that only one person to be the manager and he can add registers and stuff and the others only have access to specific screens to only see the content that the main user administers.

 

Thank you so much.

Have a nice day.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @AlexCvts ,

Could you please share a bit more about your scenario?

Do you want to limit screens access to a specific number of users?

 

Based on the needs that you mentioned, I think PowerApps could achieve your needs. You could consider set up collections in an app to store the manager info, and other normal users.

 

I have made a test on my side, please consider take a try with the following workaround:

Set the OnStart property of the App to following:

ClearCollect(ManagerInfo, {ManagerName: "Manager1", Email: "Manager1@meial.com"});
ClearCollect(
              NormalUsersInfo,
              {UserName: "User1", Email: "User1@email.com"},
              {UserName: "User2", Email: "User2@email.com"},
              {UserName: "User3", Email: "User3@email.com"},
               ...
);
If(
   User().Email in ManagerInfo.Email,
   Set(Role, "Manager"),
   User().Email in NormalUsersInfo.Email,
   Set(Role, "User")
)

Then within your app, you could visible or invisible related screens or controls based on the Role variable set up as above. E.G. Set the Visible property of a specific screen (which only Manager could access to) to following:

If(
   Role = "Manager",
   true,
   Role = "User",
   false
)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Dual Super User III
Dual Super User III

Yes, you can control the screens in the Power App that a user has access to.  Take a look at the Leave Request template.  It is an example of an App where user's login as either a regular user or a manager.  Please Note however that this will not limit user's access to whatever back end data source you are using.  In general user's will need full read write access to the data source no matter how you restrict their access in Power Apps.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted

In addition to @Pstork1 's response, if you are using CDS as the data source you might like to look at setting up user Security Roles so that the user permissions are also enforced at the database level.  For example, for the non-manager users you could restrict their security roles to have the None access level for the Create and Write privileges on the records that they should not be able to create or update.

Highlighted
Community Support
Community Support

Hi @AlexCvts ,

Could you please share a bit more about your scenario?

Do you want to limit screens access to a specific number of users?

 

Based on the needs that you mentioned, I think PowerApps could achieve your needs. You could consider set up collections in an app to store the manager info, and other normal users.

 

I have made a test on my side, please consider take a try with the following workaround:

Set the OnStart property of the App to following:

ClearCollect(ManagerInfo, {ManagerName: "Manager1", Email: "Manager1@meial.com"});
ClearCollect(
              NormalUsersInfo,
              {UserName: "User1", Email: "User1@email.com"},
              {UserName: "User2", Email: "User2@email.com"},
              {UserName: "User3", Email: "User3@email.com"},
               ...
);
If(
   User().Email in ManagerInfo.Email,
   Set(Role, "Manager"),
   User().Email in NormalUsersInfo.Email,
   Set(Role, "User")
)

Then within your app, you could visible or invisible related screens or controls based on the Role variable set up as above. E.G. Set the Visible property of a specific screen (which only Manager could access to) to following:

If(
   Role = "Manager",
   true,
   Role = "User",
   false
)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted

Thank you.

 

I have created a new collection with "username" and "email" and I set your code on the property "OnStart", now I can limit the access to different members. I think that is the best way to limit access although the comments above have also helped.

 

I´m a begginer, so everything I have developed in powerApps has been from Microsoft´s documents and youtube tutorials, but I dont know if there is another way to improve my skills not only in powerApps if not in general, java, c, python, etc. So, what do you think is the best way to improve your skills, sometimes I think that the information we have to learn in powerApps is not enough.

 

Thank you so much.

Have a nice day.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Users online (11,763)