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" } } }
```
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.

Report
All responses (
Answers (