Skip to main content

How to Get the Current User's Profile and Job Title in Power Apps (MyProfileV2)

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

User() gives you a name and an email, but not a job title, department or first name. For those, the Office 365 Users connector has Get my profile (V2), called Office365Users.MyProfileV2() in Power Apps. Here's how to call it, how to ask for only the fields you need, and where to keep the result.

Prerequisites​

Step 1: Call MyProfileV2 in a Named Formula​

In App → Formulas, add:

App → Formulas
MyProfile = Office365Users.MyProfileV2({'$select': "id,displayName,givenName,mail,userPrincipalName,jobTitle"});

The formula bar for App.Formulas expanded, showing the line that sets MyProfile to Office365Users.MyProfileV2 with a $select of id, displayName, givenName, mail, userPrincipalName and jobTitle

Two things about this formula:

  • '$select' is the connector's Select fields parameter: a comma-separated list of the fields to return. The name starts with $, so it goes in single quotes inside the record.
  • The field names are camelCase, such as jobTitle and givenName, because MyProfileV2 returns a Microsoft Graph user.

Use V2: the original Get my profile (V1) is marked deprecated in the connector reference.

Step 2: Read a Field​

Use the named formula and a field name. Type MyProfile. and IntelliSense lists the fields:

The formula bar with MyProfile. typed and an IntelliSense list of fields: aboutMe, city, companyName, country, department, displayName, givenName, id, jobTitle, mail, mailNickname and mobilePhone

Text control → Text
MyProfile.jobTitle

The formula bar with MyProfile.jobTitle, the preview strip reading MyProfile.jobTitle = Managing Director with Data type text

Step 3: Know That Unselected Fields Are Blank​

IntelliSense lists every field the connector can return, but only the ones in '$select' come back with a value. mailNickname wasn't in the example's list, so:

The formula bar with MyProfile.mailNickname, the preview strip reading MyProfile.mailNickname = Blank with Data type text

If a field is unexpectedly blank, check it's in the list.

Why Use $select at All?​

  • It avoids a known error. Without '$select', the connector requests a long list of default fields. Microsoft's known issues say the call can fail with 403 Forbidden if a tenant's policies block some of them, and the fix is to specify Select fields explicitly.
  • It's smaller and faster. You fetch only what you show.

Fields Worth Knowing​

FieldHolds
idThe Microsoft Entra object ID
displayNameFull name
givenNameFirst name
mailMailbox email address
userPrincipalNameSign-in name
jobTitleJob title
departmentDepartment

Common Mistakes​

MistakeWhat happensDo this instead
$select without single quotesA syntax error{'$select': "..."}
JobTitle with a capital JAn unknown nameUse camelCase: jobTitle
Reading a field you didn't selectBlankAdd it to '$select'

Troubleshooting​

SymptomLikely causeFix
403 Forbidden from MyProfileV2Default fields blocked by tenant policyAdd '$select'
Job title is blankNot filled in Microsoft 365, or not selectedCheck the user's profile; check '$select'
Office365Users is unknownThe data source isn't addedAdd Office 365 Users in Data

FAQ​

Do users need a premium license?​

No. Office 365 Users is a standard connector. Its connections aren't shared, so the connector reference says each person the app is shared with is prompted to create their own connection.

How often is it called?​

As a named formula, when something first needs it. Microsoft's connector reference lists a limit of 1,000 calls per connection per 60 seconds, far more than one call per session needs.

Where does the job title come from?​

From the person's Microsoft 365 profile, set by an admin; see How to Set a User's Manager and Job Title in Microsoft Entra.

Conclusion​

Put Office365Users.MyProfileV2 with a '$select' list in a named formula, read camelCase fields such as MyProfile.jobTitle, and remember that anything not selected comes back blank.

Additional Resources​

Stay Updated

Subscribe to our newsletter for the latest tutorials, tech insights, and developer news.

By subscribing, you agree to our privacy policy. Unsubscribe at any time.