cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Restricting Functions and Access

Is there a way to restrict access to screens or functions (i.e. create or remove records from a data source) within an app?

I believe this can be easily done with an if statement within the visible property, but where can the groups or users be defined to ensure the restriction is enabled?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Restricting Functions and Access

Hi @duncant ,

Do you want to limit the function of creating or removing data source?

There are two ways, let me explain them.

1)give different users different permission of your data source.

You should setting this in your data source.

 

2)use if statement when creating or removing data source to justify users.

You should set this in your app.

For example, set the navigate button's OnSelect:

If(User().Email="emailaddress1",Navigate(Screenupdate),
   Navigate(Screenread)
   )

You could only set the submit button's OnSelect:

If(User().Email="emailaddress1",Patch(...))  //please replace emailaddress1 with the emaill address that you want

//only current user's email="emailaddress1", then he could submit the data

 

 

Best regards,

Community Support Team _ Phoebe Liu
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
Continued Contributor
Continued Contributor

Re: Restricting Functions and Access

You can restrict access by determining if the user belongs to an Active Directory Security Group, SharePoint Group, or Office 365 Group.

 

This is from a post I wrote on implementing security using the Office 365 Groups connector. 

https://docs.microsoft.com/en-us/connectors/office365groups/

 

My Post: https://powerusers.microsoft.com/t5/News-Announcements-Formerly/Components-Part-2-Theme-Component-Ad...

In the Parent, App - OnStart property add the following after where we detect if we are connected or not:

// Detect if we are Online or Offline
...

ClearCollect(
    BrandingSecurityGroup,
    Office365Groups.ListGroupMembers("[GROUP OBJECT ID]").value
);
If(
    Office365Users.MyProfile().DisplayName in BrandingSecurityGroup.displayName,
    Set(
        SharePointAccess,
        true
    ),
    Set(
        SharePointAccess,
        false
    )
)

Hope this helps.

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Restricting Functions and Access

Hi @duncant ,

Do you want to limit the function of creating or removing data source?

There are two ways, let me explain them.

1)give different users different permission of your data source.

You should setting this in your data source.

 

2)use if statement when creating or removing data source to justify users.

You should set this in your app.

For example, set the navigate button's OnSelect:

If(User().Email="emailaddress1",Navigate(Screenupdate),
   Navigate(Screenread)
   )

You could only set the submit button's OnSelect:

If(User().Email="emailaddress1",Patch(...))  //please replace emailaddress1 with the emaill address that you want

//only current user's email="emailaddress1", then he could submit the data

 

 

Best regards,

Community Support Team _ Phoebe Liu
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
Helper III
Helper III

Re: Restricting Functions and Access

What if you want to limit access by group versus having to key in each email, how would you go about doing that?

Highlighted
Continued Contributor
Continued Contributor

Re: Restricting Functions and Access

You can restrict access by determining if the user belongs to an Active Directory Security Group, SharePoint Group, or Office 365 Group.

 

This is from a post I wrote on implementing security using the Office 365 Groups connector. 

https://docs.microsoft.com/en-us/connectors/office365groups/

 

My Post: https://powerusers.microsoft.com/t5/News-Announcements-Formerly/Components-Part-2-Theme-Component-Ad...

In the Parent, App - OnStart property add the following after where we detect if we are connected or not:

// Detect if we are Online or Offline
...

ClearCollect(
    BrandingSecurityGroup,
    Office365Groups.ListGroupMembers("[GROUP OBJECT ID]").value
);
If(
    Office365Users.MyProfile().DisplayName in BrandingSecurityGroup.displayName,
    Set(
        SharePointAccess,
        true
    ),
    Set(
        SharePointAccess,
        false
    )
)

Hope this helps.

View solution in original post

Highlighted
Helper III
Helper III

Re: Restricting Functions and Access

Lets say you are not using Common Data Services to restrict your data, but an excel spreadsheet instead.  What would you do then?

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (9,794)