Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

ResourceNotFound error when calling Office365 Users Connector using the Office365Users.DirectReportsV2(txtInfoAbout.Text).xxxxxx function

(0) ShareShare
ReportReport
Posted on by 142

What is weird is that the function is returning the correct value even though it is barking at me that it can't find the specific resource being queried.

MDS-GS_0-1600459743083.png

Anyone have any thoughts?

Categories:
  • MS-22072102-0 Profile Picture
    142 on at
    Re: ResourceNotFound error when calling Office365 Users Connector using the Office365Users.DirectReportsV2(txtInfoAbout.Text).xxxxxx function

    and the answer to the question what is the difference between V2 and the older methods in this connector is here

    https://docs.microsoft.com/en-us/connectors/office365users/

     

  • Verified answer
    MS-22072102-0 Profile Picture
    142 on at
    Re: ResourceNotFound error when calling Office365 Users Connector using the Office365Users.DirectReportsV2(txtInfoAbout.Text).xxxxxx function

    The very strange PowerApps parser strikes again.  After checking and double checking my syntax and still getting the RecordNotFound error, I just saved/published/closed the file.  When I reopened, all is fine.  I suspect that it got a bad record early in the construction process and didn't clear that error until I closed and reloaded.

     

    Now the only remaining question is where the documentation between original UserProfile and UserProfileV2 is?  Same for the DirectReportsV2, MyProfileV2, SearchUserV2, UserPhotoV2 methods.  I am curious as to what has changed and is the old one just in there to protect backward compatibility?

     

    "mobilePhone: " & Office365Users.UserProfileV2(txtInfoAbout.Text).mobilePhone  and

    "mobilePhone: " & Office365Users.UserProfile(txtInfoAbout.Text).mobilePhone

  • MS-22072102-0 Profile Picture
    142 on at
    Re: ResourceNotFound error when calling Office365 Users Connector using the Office365Users.DirectReportsV2(txtInfoAbout.Text).xxxxxx function

    That is what is so weird. The email samples  I am putting in are all in the Userlist and as you can see, the correct values are being returned along with the error code. 

    I suspect that it is a “permissions” thing somewhere in the chain, possibly from the non-default PowerPlatform environment we are using or something. 

    This should just work and as always, the error codes are cryptic and inscrutable. 

  • mdevaney Profile Picture
    29,987 Super User 2025 Season 1 on at
    Re: ResourceNotFound error when calling Office365 Users Connector using the Office365Users.DirectReportsV2(txtInfoAbout.Text).xxxxxx function

    @markslosberg 
    Typically you would receive this error message when an user email that does not exist is supplied to UserProfileV2.

     

    Firstly, what happens if you Refresh the Office365Users connector.  Do you still get the error?

    Secondly, please show me what formula you are using in the Text property.  Then tell me what happens when you hardcode the email like this "mdevaney@yourcompany.com"

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,635 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard