cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
indhaa
Impactful Individual
Impactful Individual

Get EmployeeID on Powerapps

Hi,

 

Can someone help me how to get this done. I have combo box for search to get all the relevant fields to be filled automatically when you select a user. However I don't know how to get the employeeID.   

 

Office365Users.SearchUser({searchTerm:PeoplePicker.SearchText})

 

indhaa_0-1612715118235.png

 

if someone can guide me how to do this. This is a submission form so the data need to be prompted in this screen. I saw some documentation that this attributes can be retrieved now but I haven't clue how to do it, Any help will be appreciated

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

To avoid using the Microsoft Graph, you will need to do this in a Power Automate Flow.  See my sample Flow below.

Steveo1_2-1613230450856.png

In the OnChange property of my Email card's DataCardValue, I put this expression.  GetEmployeeId is the name of the Flow, and it accepts one parameter, the email (or UserPrincipalName):

Set(Employee, GetEmployeeId.Run(DataCardValue2.Text))

Then for the Default value of my EmployeeId data card, I set it to the value below.

Steveo1_3-1613230868563.png

 

Steveo1_1-1613229888482.png

 

 

View solution in original post

15 REPLIES 15
Jeff_Thorpe
Super User
Super User

Is the employeeID the same as the email address or UPN (account login) or something else?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
indhaa
Impactful Individual
Impactful Individual

No. employeeID is an attribute on Azure AD. I can see documentation on how it can be implemented via power automate and also using the Microsoft graph rest API but I don't know how to connect it to my PowerApps screen. Maybe I have to use SharePoint list and generate the data from it. Any help

Jeff_Thorpe
Super User
Super User

The Employee ID isn't part of the O365 User connector, so I am not sure how you would use a pre-existing connector to get that data in Power Apps. You mention you saw documentation about how to do this in Power Automate. Did it show a HTTP connector making a call to the MS Graph API to get the data? If you can get the data through the MS Graph then you could create a custom connector that Power Apps could use to get the data.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
indhaa
Impactful Individual
Impactful Individual

Hi

 

Since HTTP is a premium connector,  I'm trying if I can retrieve employeeID  with solution provided below without using MS Graph but still not able to grasp what he did. Can I get your input on this?

https://powerusers.microsoft.com/t5/General-Power-Automate/How-to-get-Employee-ID-from-AD/m-p/373437

 

Hi @indhaa ,

Let me clarify. What you need is the AzureAD ID of the selected user in combobox ?

Well, I guess the simpliest way is to use AzureAD connector (standard one) like this:

AzureAD.GetUser(Peoplepicker.Selected.Mail).id

 

Hope it helps !

indhaa
Impactful Individual
Impactful Individual

Hi

 

I'm talking about the employeeID attribute.  https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0

 

indhaa_0-1613220150982.png

 

 Any idea how to get that?

Sorry .. it seems that i have misunderstood your issue.

Anonymous
Not applicable

To avoid using the Microsoft Graph, you will need to do this in a Power Automate Flow.  See my sample Flow below.

Steveo1_2-1613230450856.png

In the OnChange property of my Email card's DataCardValue, I put this expression.  GetEmployeeId is the name of the Flow, and it accepts one parameter, the email (or UserPrincipalName):

Set(Employee, GetEmployeeId.Run(DataCardValue2.Text))

Then for the Default value of my EmployeeId data card, I set it to the value below.

Steveo1_3-1613230868563.png

 

Steveo1_1-1613229888482.png

 

 

View solution in original post

indhaa
Impactful Individual
Impactful Individual

Hi

 

Thanks for the help. Were you able to get the employeeId?. I'm still getting an error. Let me know how you did this part. I cannot see employeeID as an available field

indhaa_0-1613236317630.png

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Top Solution Authors
Top Kudoed Authors
Users online (2,152)