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 / Office365Users.UserPro...
Power Apps
Answered

Office365Users.UserProfileV2 failed. The method UserProfileV2 has an invalid value for parameter ID

(0) ShareShare
ReportReport
Posted on by 247

Hello everyone,

 

I have an app that on first screen i have a Card that is retrieving the users from a people picker SharePoint column from office365 and automatically display the user who is opening the app. 

Furthermore, i have 3 more cards that retrieving information based on the user selection in order to bring Department, OfficeLocation and Company Name. 

The cards are working on browser but when i use power apps application i get the following error:

 

stavrama_0-1675259482256.png

 

The interesting thing is that on android devices despite the error, the cards are fetching the selected information but on ios it doesn't work. 

I have also downloaded power apps on my pc and even though i get the error the values are being fetched as well.

 

If on ios  was working as well, i was thinking to add on app settings "On error" an if is blank statement in order to not show the error but now i am confused.

 

Anyone has an idea firstly what might cause this error and secondly why on ios it ain't working?

 

Full Name Card:
Default: { 
 DisplayName:Office365Users.UserProfileV2(User().Email).displayName,
 Claims:"i:0#.f|membership|" & Lower(User().Email), 
 Department:Office365Users.UserProfileV2(User().Email).department, 
 Email:Office365Users.UserProfileV2(User().Email).mail, 
 OfficeLocation:Office365Users.UserProfileV2(User().Email).officeLocation
 
}

DefaultSelecteditems: 
{ 
 DisplayName:Office365Users.UserProfile(User().Email).DisplayName,
 Claims:"i:0#.f|membership|" & Lower(User().Email), 
 Department:Office365Users.UserProfile(User().Email).Department, 
 Email:Office365Users.UserProfile(User().Email).Mail, 
 OfficeLocation:Office365Users.UserProfile(User().Email).OfficeLocation
}

 

Department Card:
Default: Office365Users.UserProfileV2(FullName.Selected.Email).department

 

Thanks in advance for your help.

 

 

Categories:
  • mstavra Profile Picture
    247 on at

    Hello, 

     

    After testing i find out that the results are being fetched as well on ios but for unknown reason when  i use displaymode.disabled it changed the font color to white!

     

    Anyway, the error is still there even though  it is working. Is there a way to add this on app error to ignore it?

  • Verified answer
    mstavra Profile Picture
    247 on at

    Hey again,

     

    I used the following and the annoying error stopped appearing.

     

    IfError(Office365Users.UserProfileV2(Email).id, "")

     

    stavrama_0-1676017064935.png

     

  • debomark1 Profile Picture
    2 on at

    I used this tip to resolve https://thepoweraddict.com/office365users-connector-get-rid-of-this-warning/ 

    Basically any attempt to use the O365 connector with a blank field, maybe a form set to New, can't get the data - so just put a 'if not blank' before your call


    If(
     !IsBlank(DataCardValue1.Text),
     Office365Users.UserProfileV2(DataCardValue2.Selected.Email).mail,
     "blank"
    )

      

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard