cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AraSaber12
Level 8

Security account/login screen

Hi Guys,

 

I created an app in PowerApps, and I would like to share this with my colleagues/managers from different countries.

 

So how can I determine that the manager from Netherlands only can see the employees from Netherlands and the manager from Belgium only can see employees from Belgium etc.

I did this manually in my home page through Filter function. So I have one app which is filtered only for Netherlands and another app filtered only for Belgium.

My question is, how can I use only 1 app for all countries and when the users/managers log in, then they the only see his employees from his country?

I need this because otherwise I have to make all lot of Apps instead of one.

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Security account/login screen

If you had the manager was listed on the Employee table then you could use the logged in user's name to filter the table. How do you know the logged in user is a manager and what country they are from?

You could use the Office365Users connector to get the current user's country and then filter the employee table by the current user's country.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

5 REPLIES 5
MattyH
Level 8

Re: Security account/login screen

I believe that the user for PowerApps only has the same security accesses as they have in the original data source, at least, that's how it seems to work for me, in which case, if they are only cleared to see certain employees in the original data, then they will only see those same employees in the app.

Super User
Super User

Re: Security account/login screen

Since I don't know your data source or data structure, I will provide you with some basic help. You can use the logged in user (i.e. User()) to filter your lists and galleries, so that the user only sees the data where they are listed as manager. This assumes that your data includes the manager information. 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Highlighted
AraSaber12
Level 8

Re: Security account/login screen

Hi @Jeff_Thorpe  @MattyH ,

 

I will explain you guys better. I have an table called employees (columns, name, employeeID, country etc), and I have an table called accouts( columns, Email, Password and Country).

 

So in my homepage as you can see I have a gallery. I want when a user/manager from Netherlands logged in, then that he only can see the employee from his country (Netherlands) and this applies to other managers from different countries.

 

Untitled.png

 

So I want when a user login that the filter function automatic will be change. 

Please let me know if you need more information. 

 

@Jeff_Thorpe If I use User() how can I filter this in my home page? 

Super User
Super User

Re: Security account/login screen

If you had the manager was listed on the Employee table then you could use the logged in user's name to filter the table. How do you know the logged in user is a manager and what country they are from?

You could use the Office365Users connector to get the current user's country and then filter the employee table by the current user's country.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

AraSaber12
Level 8

Re: Security account/login screen

@Jeff_Thorpe  Thank you it works! 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,253)