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
Unanswered

Office365users.userprofile failed due to incorrect userid

(0) ShareShare
ReportReport
Posted on by 9

I have created an APP containing two fields to select an Microsoft 365 account.

However in the test environment (different tenant) I was able to select one of all existing accounts available.

In the production environment of my client (more than 3000 accounts) I only see a view and selecting one of these the APP does not process . When using a manual input like jsleeboom@officekundigdev.onmicrosoft.com it is working fine.

In the PowerApp we already set the option to select maximum available fields but it didn't change anything.

Please help me out and explain what is going wrong on this production tenant.

 

Kind regards,

Jan

Netherlands

Categories:
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi Jan,

     

    Can you please share the code that isn't working and any error messages you are getting? Are the two fields you mention peoplepickers? If so, what are their items properties?

  • OfficeKundigDEV Profile Picture
    9 on at

    It is a PeoplePicker field

    The update looks like:
    {
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Claims: "i:0#.f|membership|" & Lower(ComboBox6.Selected.Mail),
    DisplayName: ComboBox6.Selected.DisplayName
    }

    The Items field:
    Office365Users.SearchUser()

    Dropdown field itself
    The DefaultSelectedItems:
    if(IsBlank(ThisItem.'QHSE Manager'.Email),Office365Users.UserProfile("A***.W***@T***nc.com"),Office365Users.UserProfile(ThisItem.'QHSE Manager'.Email))

    This Item field looks like:
    Office365Users.SearchUser()

  • OfficeKundig Profile Picture
    65 on at

    Please can someone send me the solution for this issue!?

    kind regards,

    Jan

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @OfficeKundig ,

     

    I have done a test with a ComboBox which is working for me, so please try this.

     

    Set the Items property for:

    Office365Users.SearchUser({searchTerm:Self.SearchText})

     

    Then set the Layout to 'Person' and check the Primary Text, Secondary Text and SearchField properties:

     

    BCBuizer_0-1650381564204.png

     

    This is in an environment with well over 3K users, so the dropdown itself will not show all users, but rather a suggestion. The more characters you add to the SearchText, the better your results will be.

  • OfficeKundig Profile Picture
    65 on at

    I have changed the Items property to

    Office365Users.SearchUser({searchTerm:Self.SearchText})  But there is no option for {secondary text}

    However the search users issue has been solved but I still receive this error message.

     

    kind regards,

    Jan

     

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @OfficeKundig ,

     

    Can you please share the error message and what you receive it against?

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @OfficeKundig ,

     

    Hope you managed to find a solution for your issue. If so, can you please share so and mark the solution for the benefit of other users?

  • OfficeKundig Profile Picture
    65 on at

    Hi,

    sorry for the late reaction. But this error message is equal to the header of this:

    When starting the powerapp {Office365users.userprofile failed due to incorrect userid} pops-up

    kind regards, Jan

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @OfficeKundig ,

     

    Perhaps it's worth a try to create a similar solution to this:

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/the-service-returned-an-error-Office365Users-UserProfile/td-p/32972

     

    If(!IsBlank(Self.SearchText),Office365Users.SearchUser({searchTerm:Self.SearchText}))
  • OfficeKundig Profile Picture
    65 on at

    Woawh! this solved this issue.

     

    Many thanks for your input and patience helping me.

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 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard