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

Get detail of current logged in user using Powerapps Component Framework

Hi. Can anyone tell me what is the way of getting the details (fullname,email,etc) of the current logged in user using the powerapps component framework. Thank you.

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @ThareLyn :

User's info is available under context.userSettings. 

I think this link will help you a lot:

Context 

UserSettings 

In addition,you can also refer to this post:

How to display the current user information by code? 

Best Regards,

Bof

View solution in original post

you can get user name and userid and security roles of the user from context.userSettings.

context.userSettings.userName

 

However, if you need other user attributes, you may need to use context.webapi.retrieve to query uer entity with userid

View solution in original post

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @ThareLyn :

User's info is available under context.userSettings. 

I think this link will help you a lot:

Context 

UserSettings 

In addition,you can also refer to this post:

How to display the current user information by code? 

Best Regards,

Bof

View solution in original post

you can get user name and userid and security roles of the user from context.userSettings.

context.userSettings.userName

 

However, if you need other user attributes, you may need to use context.webapi.retrieve to query uer entity with userid

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

Users online (1,049)