PowerApps User Function & Office 365 Users Guide

PowerApps User Function Office 365 Users Connector Guide

List of all user attributes you can retrieve with PowerApps. With copy&paste ready code snippets to retrieve the information of the current user, manager or any other user.

PowerApps User Function

The User function provides access to the following user information for the currently logged in user:

  • Full name
  • Email
  • Image

Syntax

User()

Return Value

For my user the variable CurrentUser would look like below after the call.

Set(CurrentUser,User());
PowerApps User Function Return Value
Example: User function return value

User Function Examples

User() 
=>
{ 
   FullName: "Johannes Zeitgeistcode", 
   Email: "[email protected]", 
   Image: "blob:1234...5678" 
}

User().FullName
=> "Johannes Zeitgeistcode"

User().Email
=> "[email protected]"

User().Image
=> "blob:1234...5678"

How To Add Office 365 Users Connector

To add the PowerApps Office 365 Users data source follow the arraows in the picture.

PowerApps Connector Add Office365USers
Connect to Office 365 Users connection from Power Apps

How To Get User Details With Office365Users Connector

Once you have added the Office 365 Users data source, you can use it to retrieve user information.

Below you find every user detail you can request.

About me

About me.

  • Type: String

Get about me for current user

Office365Users.MyProfileV2().aboutMe

Get about me for any user

Office365Users.UserProfileV2("[email protected]").aboutMe

Get about me for manager of current user

Office365Users.ManagerV2(User().Email).aboutMe

Account enabled

Account enabled flag.

  • Type: Boolean
  • Example: true | false

Get account enabled for current user

Office365Users.MyProfileV2().accountEnabled

Get account enabled for any user

Office365Users.UserProfileV2("[email protected]").accountEnabled

Get account enabled for manager of current user

Office365Users.ManagerV2(User().Email).accountEnabled

Birthday

Birthday of user.

  • Type: String (Date-time)
  • Example: “1980-03-05T00:00:00Z”

Get birthday for current user

Office365Users.MyProfileV2().birthday

Get birthday for any user

Office365Users.UserProfileV2("[email protected]").birthday

Get birthday for manager of current user

Office365Users.ManagerV2(User().Email).birthday

Business phones

Phone numbers of user’s company.

  • Type: Array of Strings
  • Example: [ { Value: “+1 (111) 222 3333” }, {Value: “+1 (111) 222 4444”} ]

Get business phones for current user

Office365Users.MyProfileV2().businessPhones  
// First(Office365Users.MyProfileV2().businessPhones).Value

Get business phones for any user

Office365Users.UserProfileV2("[email protected]").businessPhones 
// First(Office365Users.UserProfileV2("[email protected]").businessPhones).Value 

Get business phones for manager of current user

Office365Users.ManagerV2(User().Email).businessPhones
// First(Office365Users.ManagerV2(User().Email).businessPhones).Value 

City

City of user.

  • Type: String
  • Example: “Chicago”

Get city for current user

Office365Users.MyProfileV2().city

Get city for any user

Office365Users.UserProfileV2("[email protected]").city

Get city for manager of current user

Office365Users.ManagerV2(User().Email).city

Company name

Company of user.

  • Type: String
  • Example: “Microsoft”

Get company name for current user

Office365Users.MyProfileV2().companyName

Get company name for any user

Office365Users.UserProfileV2("[email protected]").companyName

Get company name for manager of current user

Office365Users.ManagerV2(User().Email).companyName

Country

Country of user.

  • Type: String
  • Example: “Brasil”

Get country for current user

Office365Users.MyProfileV2().country 

Get country for any user

Office365Users.UserProfileV2("[email protected]").country 

Get country for manager of current user

Office365Users.ManagerV2(User().Email).country 

Department

Department of user.

  • Type: String
  • Example: “IT”

Get department for current user

Office365Users.MyProfileV2().department

Get department for any user

Office365Users.UserProfileV2("[email protected]").department

Get department for manager of current user

Office365Users.ManagerV2(User().Email).department

Display name

Display name of user.

  • Type: String
  • Example: “John Doe”

Get display name for current user

Office365Users.MyProfileV2().displayName

Get display name for any user

Office365Users.UserProfileV2("[email protected]").displayName

Get display name for manager of current user

Office365Users.ManagerV2(User().Email).displayName

Given name

Given name of user.

  • Type: String
  • Example: “John”

Get given name for current user

Office365Users.MyProfileV2().givenName

Get given name for any user

Office365Users.UserProfileV2("[email protected]").givenName

Get given name for manager of current user

Office365Users.ManagerV2(User().Email).givenName

Hire date

Hire date of user.

  • Type: String (date-time)
  • Example: “”20220-08-11T00:00:00Z””

Get given name for current user

Office365Users.MyProfileV2().hireDate

Get given name for any user

Office365Users.UserProfileV2("[email protected]").hireDate

Get given name for manager of current user

Office365Users.ManagerV2(User().Email).hireDate

Id

User id.

  • Type: String
  • Example: “d00bbe0b-111c-444f-0ac0-c1a1c01a6ba3”

Get id for current user

Office365Users.MyProfileV2().id

Get id for any user

Office365Users.UserProfileV2("[email protected]").id

Get id for manager of current user

Office365Users.ManagerV2(User().Email).id

Interests

Interests of user.

  • Type: Array of Strings
  • Example: [ { Value: “Running”} , { Value: “Chess”} ]

Get interests for current user

Office365Users.MyProfileV2().interests

Get interests for any user

Office365Users.UserProfileV2("[email protected]").interests

Get interests for manager of current user

Office365Users.ManagerV2(User().Email).interests

Job title

Job title of user.

  • Type: String
  • Example: “Key Account Manager”

Get job title for current user

Office365Users.MyProfileV2().jobTitle

Get job title for any user

Office365Users.UserProfileV2("[email protected]").jobTitle

Get job title for manager of current user

Office365Users.ManagerV2(User().Email).jobTitle

Mail

Email id of user.

Get mail for current user

Office365Users.MyProfileV2().mail

Get mail for any user

Office365Users.UserProfileV2("[email protected]").mail

Get mail for manager of current user

Office365Users.ManagerV2(User().Email).mail

Mail nickname

Nickname of user.

  • Type: String
  • Example: “someone.email.com”

Get mail for current user

Office365Users.MyProfileV2().mailNickname

Get mail for any user

Office365Users.UserProfileV2("[email protected]").mailNickname

Get mail for manager of current user

Office365Users.ManagerV2(User().Email).mailNickname

Mobile phone

Mobile phone of user.

  • Type: String
  • Example: “+1 (111) 222 3333”

Get mobile phone for current user

Office365Users.MyProfileV2().mobilePhone

Get mobile phone for any user

Office365Users.UserProfileV2("[email protected]").mobilePhone

Get mobile phone for manager of current user

Office365Users.ManagerV2(User().Email).mobilePhone

My site

My site.

  • Type: String

Get my site for current user

Office365Users.MyProfileV2().mySite

Get my site for any user

Office365Users.UserProfileV2("[email protected]").mySite

Get my site for manager of current user

Office365Users.ManagerV2(User().Email).mySite

Office location

Office location of user.

  • Type: String
  • Example: “2nd Floor; Room 2.07”

Get office location for current user

Office365Users.MyProfileV2().officeLocation

Get office location for any user

Office365Users.UserProfileV2("[email protected]").officeLocation

Get office location for manager of current user

Office365Users.ManagerV2(User().Email).officeLocation

Past projects

Past projects of user.

  • Type: Array of Strings
  • Example: [ { Value: “Vacation Planer”} , { Value: “Revenue Maximizer” } ]

Get past project for current user

Office365Users.MyProfileV2().pastProjects

Get past projects for any user

Office365Users.UserProfileV2("[email protected]").pastProjects

Get past projects for manager of current user

Office365Users.ManagerV2(User().Email).pastProjects

Postal code

Postal code of user.

  • Type: String
  • Example: “94043”

Get postal code for current user

Office365Users.MyProfileV2().postalCode

Get postal code for any user

Office365Users.UserProfileV2("[email protected]").postalCode

Get postal code for manager of current user

Office365Users.ManagerV2(User().Email).postalCode

Preferrred language

Preferred language of user.

  • Type: String

Get preferred language for current user

Office365Users.MyProfileV2().preferredLanguage

Get preferred language for any user

Office365Users.UserProfileV2("[email protected]").preferredLanguage

Get preferred language for manager of current user

Office365Users.ManagerV2(User().Email).preferredLanguage

Preferrred name

Preferred name of user.

  • Type: String
  • Example: “Luke Skywalker”

Get preferred name for current user

Office365Users.MyProfileV2().preferredName

Get preferred name for any user

Office365Users.UserProfileV2("[email protected]").preferredName

Get preferred name for manager of current user

Office365Users.ManagerV2(User().Email).preferredName

Responsibilities

Responsibilities of user.

  • Type: Array of Strings
  • Example: [ { Value: “Team Lead Power Platform”} , { Value: “Quality Manager Power Platform” } ]

Get responsibilities for current user

Office365Users.MyProfileV2().responsibilities

Get responsibilities for any user

Office365Users.UserProfileV2("[email protected]").responsibilities

Get responsibilities for manager of current user

Office365Users.ManagerV2(User().Email).responsibilities

Schools

Schools of user.

  • Type: Array of Strings
  • Example: [ { Value: “Florida State University”} , { Value: “Univeristy of Miami”} ]

Get schools for current user

Office365Users.MyProfileV2().schools

Get schools for any user

Office365Users.UserProfileV2("[email protected]").schools

Get schools for manager of current user

Office365Users.ManagerV2(User().Email).schools

Skills

Skills of user.

  • Type: Array of Strings
  • Example: [ { Value: “PowerApps”} , { Value: “Power Automate”} ]

Get skills for current user

Office365Users.MyProfileV2().skills

Get skills for any user

Office365Users.UserProfileV2("[email protected]").skills

Get skills for manager of current user

Office365Users.ManagerV2(User().Email).skills

State

State of user.

  • Type: String
  • Example: “Florida”

Get state for current user

Office365Users.MyProfileV2().state

Get state for any user

Office365Users.UserProfileV2("[email protected]").state

Get state for manager of current user

Office365Users.ManagerV2(User().Email).state

Street address

Street address of user.

  • Type: String
  • Example: “1200 SE COUNTY ROAD 475”

Get street address for current user

Office365Users.MyProfileV2().streetAddress

Get street address for any user

Office365Users.UserProfileV2("[email protected]").streetAddress

Get street address for manager of current user

Office365Users.ManagerV2(User().Email).streetAddress

Surname

Surname of user.

  • Type: String
  • Example: “Doe”

Get surname for current user

Office365Users.MyProfileV2().surname

Get surname for any user

Office365Users.UserProfileV2("[email protected]").surname

Get surname for manager of current user

Office365Users.ManagerV2(User().Email).surname

User Principal Name

User Principal Name.

Get surname for current user

Office365Users.MyProfileV2().userPrincipalName

Get surname for any user

Office365Users.UserProfileV2("[email protected]").userPrincipalName

Get surname for manager of current user

Office365Users.ManagerV2(User().Email).userPrincipalName

User type

User Type.

  • Type: String
  • Example: “Member” or “Guest”

Get user type for current user

Office365Users.MyProfileV2().userType

Get user type for any user

Office365Users.UserProfileV2("[email protected]").userType

Get user type for manager of current user

Office365Users.ManagerV2(User().Email).userType

Leave a Comment

Your email address will not be published.