cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Cooper01
Solution Supplier
Solution Supplier

Office365.MyProfile failed 404

In my application OnStart, I have a global variable being set through the following:

Set(
    MyOffice365Profile,
    Office365Users.MyProfile()
);

Later in the OnStart, I use

MyOffice365Profile.Mail

This works fine for the majority of users, but for one user they are getting a red error message along at top of the screen with the following message:

Office365Users.MyProfile failed: { "statusCode": 404, "message": "Resource not found" }

 

I am able to get the user through the Power App using 

Office365Users.UserProfileV2("user name").mail

as well as flow.

 

How do I go about troubleshooting why their User Profile is not loading on start?

1 ACCEPTED SOLUTION

Accepted Solutions
Cooper01
Solution Supplier
Solution Supplier

In case this comes up for anyone else, here are the steps I took to troubleshoot:

  • In the Power App, validate I could get the user on their UPN using the O365 Users connector, not helpful as this was successful
  • In a flow, validate I could get the user on their UPN and using Search for User action. Ensure nothing looked weird about the profile info being pulled back. Not helpful as this was successful
  • Create a flow with the Get My O365 Profile and have the user run it to see if he specifically couldn't get his own profile for whatever reason, not helpful as this was successful
  • In the Power Platform Admin center, open my environment and then click Resources > Power Apps. Click the ... next to my app and choose Settings. In the Connections tab, find that there is no connection for the user in question. Assume that the user did not consent to the connections being used by the app, or that for whatever reason the consent was not properly captured

View solution in original post

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @Cooper01 :

I’m not sure why this user encountered this problem, but you can take the following steps:

1\Give this user editing permissions for this app

2\Let this user open the app in edit mode(in PowerApps create Studio)

3\Run OnStart

1.JPG

4\Open monitor

2.JPG

This may help you find the problem

In addition,If this problem can not be solved. I suggest you use this formula as an alternative:

Set(
    MyOffice365Profile,
    User()
);

and then use

MyOffice365Profile.Email

to get the current user's email address.

Best Regards,

Bof

Cooper01
Solution Supplier
Solution Supplier

In case this comes up for anyone else, here are the steps I took to troubleshoot:

  • In the Power App, validate I could get the user on their UPN using the O365 Users connector, not helpful as this was successful
  • In a flow, validate I could get the user on their UPN and using Search for User action. Ensure nothing looked weird about the profile info being pulled back. Not helpful as this was successful
  • Create a flow with the Get My O365 Profile and have the user run it to see if he specifically couldn't get his own profile for whatever reason, not helpful as this was successful
  • In the Power Platform Admin center, open my environment and then click Resources > Power Apps. Click the ... next to my app and choose Settings. In the Connections tab, find that there is no connection for the user in question. Assume that the user did not consent to the connections being used by the app, or that for whatever reason the consent was not properly captured

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,942)