cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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

Hello Power Apps Community!

 

I have a couple apps that use the Office365UserProfileV2 connector. To avoid getting the following runtime error, I had the code written down as:

If(
!IsBlankOrError(glryDirectory.Selected.Mail),
Office365Users.UserProfileV2((glryDirectory.Selected.Mail))
)

The solution worked as expected for months. However, without making any changes to the code, the runtime error re-appeared a few months ago. Has anyone run into a similar scenario? does anyone have any information as to why this error might be re-appearing?

 

Thanks!

5 REPLIES 5
alaabitar
Solution Specialist
Solution Specialist

Hello,

 

Usually instead of passing the Mail I always prefer to pass the Id of the user.

 

Best regards,

Alaa

v-JessicaG-msft
Community Support
Community Support

Hi @Anonymous ,

 

Use !IsBlankOrError function could not completely avoid this error, you could avoid this error by adding all fields when adding information in Azure AD (for example: write some prompt characters when you don't know what to fill in).

 

Best Regards,

Jessica Gu

Anonymous
Not applicable

Hi @v-JessicaG-msft ,

I'm not sure I completely follow this solution. Maybe I'll give some more details on how I'm using this:

The App allows the some users to view the data presented as if they were someone else. The list of users that they can choose from comes from SAP and only contains emails ( @alaabitar , this is why I cannot use User IDs). Based on the selection, Power Apps retrieves the profile for the selected person. So I am not actually sending any information to Azure AD, I am just using what is already in the system.

 

Thanks!  

alaabitar
Solution Specialist
Solution Specialist

What I meant from my previous post is to do something like

If(

!IsBlankOrError(glryDirectory.Selected.Id),

Office365Users.UserProfileV2((glryDirectory.Selected.Id))

)

Anonymous
Not applicable

Hi @alaabitar ,

The selected item from my gallery comes from a list of emails that I extract from SAP. Therefore, I do not have the ID's of the users right off the bat. Do you have any other ideas of how I could make this work? As I said, I had no issues with this function 6 months ago... it just came up without any code changes.

Thanks!

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (2,483)