web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / office365User.UserProf...
Power Apps
Answered

office365User.UserProfile() error

(0) ShareShare
ReportReport
Posted on by 321

Bingqiling_0-1696471423539.png

 

default of textinput

 

 

 

If(
 DataCardValue54_5.Selected.Value = newStaff,
 ("name: " & DataCardValue41_5.Selected.'name' & " " & Office365사용자.UserProfile(DataCardValue41_5.Selected.'mail').JobTitle
 , ""
)

 

 

 

<office365User.UserProfile failed at powerapps: function 'UserProfile' has invalid value for userid parameter (empty value delivered where unexpected). You receive an error message that says make sure a valid argument has been passed to the function.>
I have to deliver the empty value as default
I only want to deliver data when I have a value.
How should I solve this?

this code also not work..

If(
 IsBlank(DataCardValue41_5.Selected.'mail'), 
 Office365Users.UserProfile(),
 Office365Users.UserProfile(DataCardValue41_5.Selected.'mail')
)

 

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Bingqiling ,

     

    Please try this

    IfError(Office365Users.UserProfile(DataCardValue41_5.Selected.'mail'),"",Office365Users.UserProfile(DataCardValue41_5.Selected.'mail'))

     

    Best Regards,

    Wearsky

  • Bingqiling Profile Picture
    321 on at

    Hi @v-xiaochen-msft 

    Thank you for your solution.

    I tried putting the textInput default and app's OnStart, but I get an error. Which element is appropriate to put in??

  • Verified answer
    Bingqiling Profile Picture
    321 on at

    Oh, I put the code in the OnError of the app and the error doesn't work. Success. Thank you for your solution.😍

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard