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?
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.
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.
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
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
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.
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?
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.
WarrenBelz
93
Most Valuable Professional
MS.Ragavendar
60
stampcoin
48