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.UserPr...
Power Apps
Unanswered

"Office365Users.UserProfileV2(ThisRecord.'CreatedBy'.Email).id" Why code work before ,failed now?

(0) ShareShare
ReportReport
Posted on by 22
Hello
My apps were working fine before, but recently I've encountered the following error.
```
Office365Users.UserProfileV2 failed: { "error": { "code": "ResourceNotFound", "message": "User not found", "innerError": { "date": "2025-01-02T08:48:59", "request-id": "d16a729f-c875-43d0-88ce-11992113e32e", "client-request-id": "d16a729f-c875-43d0-88ce-11992113e32e" } } }
```
So I modified the code below:
This is the old code:
```
If(
    currentlevel = "all",
    ContractApprovalApply,
    Filter(
        ContractApprovalApply,
        Office365Users.UserProfileV2(ThisRecord.'Created By'.Email).id = Office365Users.MyProfileV2().id && Text(ApplyPhase) = currentlevel
    )
)
```
This is the new code:
```
If(
    currentlevel = "all",
    ContractApprovalApply,
    Filter(
        ContractApprovalApply,
        'Created By'.Email = User().Email && Text(ApplyPhase) = currentlevel
    )
)
```
After modifying the code, the error disappeared. However, using email addresses for identification is not very reliable, as an employee may have multiple addresses, and logging into the apps with different addresses might cause some confusion. But using "id" for identification seems to lead to the error mentioned above. Is there a better way to handle this?
Thank you.

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard