Skip to main content

Notifications

Community site session details

Community site session details

Session Id : pt1CNC+BjtbaqWyj10QaN9
Power Apps - Building Power Apps
Answered

Creating login and password on powerapps with office 365 email users

Like (0) ShareShare
ReportReport
Posted on 15 Apr 2020 20:18:33 by 98

Hello guys, is it possible to create a login screen with username and password for office 365 email on powerapps? Is there a tutorial or article?

  • Verified answer
    WarrenBelz Profile Picture
    146,953 Most Valuable Professional on 18 Apr 2020 at 21:14:19
    Re: Creating login and password on powerapps with office 365 email users

    Hi @beatrizmoura26 

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    146,953 Most Valuable Professional on 16 Apr 2020 at 22:13:39
    Re: Creating login and password on powerapps with office 365 email users

    @beatrizmoura26 ,

    You do that at the start as the user is already logged in.

    I do something very similar with a reference list with the user's email and authorities. I then at App OnStart do something like

    Set(
     vUserMail,
     User().Email
    ); //avoids delegation issues
    Set(
     vAdmin,
     Lookup(
     MyReferenceList,
     UserMailField = vUserMail,
     Admin //this is a true/false field
     )
    )

    I then have the Variable vAdmin to control what the user sees and does.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Verified answer
    Power_Robert Profile Picture
    117 on 16 Apr 2020 at 21:21:21
    Re: Creating login and password on powerapps with office 365 email users

    Depending on what you mean by "can and cannot do". If you don't what people to make changes to records if they are not an "admin", start with you data source and control access here first. If you want a different "User Experience" like different buttons / screens etc., you can work with an extra table in your data source. Something like this:

     

    Table: UserPermissions

    UserEmailIsAdminIsManagerShowDebugShowStatistics
    user1@domain.comtruetruetruetrue
    user2@domain.comtruefalsetruetrue
    user4@domain.comfalsetruefalsefalse

     

     

    Now on the OnStart of your app you can do this to get the permissions for that user:

     

     

    If(
     Not(
     IsBlank(
     LookUp(
     UserPermissions,
     UserEmail = User().Email
     )
     )
     ),
     // A record found is either Admin or Manager or both.
     Set(
     varUserPermission,
     {
     IsAdminVal: IsAdmin,
     IsManagerVal: IsManager,
     ShowDebugVal: ShowDebug,
     ShowStatisticsVal: ShowStatistics
     }
     ),
     // For non Admins or Managers
     Set(
     varUserPermission,
     {
     IsAdminVal: false,
     IsManagerVal: false,
     ShowDebugVal: false,
     ShowStatisticsVal: false
     }
    )

     

     

     

    For example if you have a container with labels somewhere on a screen with debug info, you could do this in the Visible property:

     

     

    varUserPermission.ShowDebug

     

     

    Now the debug info will only show if the user has permissions to see it. Same thing for a button that can redirect the user to a screen with statistics.

     

    In this case there is no need for a password. If you don't want users to access your app in the first place. The best this is not sharing it with those users I guess.

     

    This is just an basic example. It also al depend on what you really want to achieve and what your own permissions are at your environment.

     
    The above is not tested and might not be the best solution. But just giving some examples that might get you a bit further. You can also have a look at Shane's video: https://www.youtube.com/watch?v=NqQGysNCac0

  • beatrizmoura26 Profile Picture
    98 on 16 Apr 2020 at 18:35:59
    Re: Creating login and password on powerapps with office 365 email users
     
    Sorry I think I was not clear.
    
    I want to be able to define accesses. Example
    
    Login x access as administrator
    
    Login and access as a common user.
    
    And from these accesses define what the user can and cannot do.

     

  • Power_Robert Profile Picture
    117 on 15 Apr 2020 at 21:07:01
    Re: Creating login and password on powerapps with office 365 email users

    Hi @beatrizmoura26,

     

    Don't you already have to login into PowerApps.com or the PowerApps App using your Office 365 user credentials to even open the app? Can you please explain what you are trying to accomplish?

  • WarrenBelz Profile Picture
    146,953 Most Valuable Professional on 15 Apr 2020 at 21:01:01
    Re: Creating login and password on powerapps with office 365 email users

    Hi @beatrizmoura26 ,

    Yes you could, but I am assuming you are going to use a different password as the user has already logged into Power Apps and established their credentials.

    If so, you would just need a reference list with the user name and password required.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 93 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 60

#3
stampcoin Profile Picture

stampcoin 48

Overall leaderboard