cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
duncant
Level: Powered On

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
Community Support Team
Community Support Team

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

KC
Level 8

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
Community Support Team
Community Support Team

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

duncant
Level: Powered On

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?

KC
Level 8

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

duncant
Level: Powered On

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
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,059)