cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Cooper01
Continued Contributor
Continued Contributor

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
Continued Contributor
Continued Contributor

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
Continued Contributor
Continued Contributor

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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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