cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JimNoredlac
Helper I
Helper I

list of office 365 users in dropdown

Hi.

I create an app with a first page login. I want user to select his mail using a dropdown list, displaying all office 365 users.

But Office365Users.UserProfile(InfoAbout.Text).Mail is text and not table.

What's is the correct syntaxt for this ?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Even if the password hash was available which would make it possible to have another sheet, I think the user could still have taken the Excel data source and bind it to a Gallery (for example) to see all the content without any restrictions.

I think the best way would be to enforce the security at the server with SharePoint or with a database (SQL Server, MySQL or else).

 

View solution in original post

6 REPLIES 6
dinusc
Microsoft
Microsoft

You can list all the users with the following formula:
Office365Users.SearchUser({searchTerm:"John"}).Mail

or

Office365Users.SearchUser({searchTerm:""}).Mail

Thank you: it works! But I realize that office365 password is not in the possibles items. There is not syntaxt for password, even crypted ? Do I need to make my own table of login passwords ?

The passwords are not included possibly for security reasons (checked the Office365Users.UserProfileV2()). I'm not sure I understand the need for that field. Are you building an app that would allow the users to change their passwords? I don't think that is supported either.

I connected the app to an excel file. One sheet for timesheet of my employees, and one sheet with employees details. Each employees needs to complete each day their timesheet. I would like each employee to complete his own timesheet, and most importantly can't modify others timesheet employees. I imagined employees could log with  office 365 password, and filter data depending of mail or name. But It seems difficult to build an other sheet with username, userId and most of all encrypted passord. In that case, I should protect the excel file...

Even if the password hash was available which would make it possible to have another sheet, I think the user could still have taken the Excel data source and bind it to a Gallery (for example) to see all the content without any restrictions.

I think the best way would be to enforce the security at the server with SharePoint or with a database (SQL Server, MySQL or else).

 

View solution in original post

I think you're right: I've search everywhere and didn't find any other proposition. I finaly simply add a sheet with login, ID_User, and Password. I've hidden the column and protect sheet with my own password. Thank you very much.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,585)