Showing results for 
Search instead for 
Did you mean: 
0 Kudos

Error string for when an office 365 user has left the organization



I'd like to make a suggestion for the addition of an error handling for once an Office 365 user has left my current organization. So the way my app works is that i have a database table of all staff users who can carry out a tour.


This table is populated by the user's work e-mail, inserted from office 365 users and i have a lookup throuygh my app connection to office365 users to locate their profile image (if they have one). The issues then arise when they leave the organization and as a result, their office 365 profile is deleted. 


I still need to hold data of the tours they've carried out and just want to do a simple if statement to lookup all offfice365users via the stored e-mail from the database table, and if it doesn't find a record, to display a SampleImage.


However, after trying a range of formulas and starting a thread on here, there doesn't seem to be a workaround without getting the error message on screen load. Thus, i use the following if statement, which means the lookup for this user wouldn't even be in the true statement (as they're not set as a current employer), i still get the attached error. 


If(ThisItem.Current_Employer = false, SampleImage, If(Office365Users.UserPhotoMetadata(ThisItem.StaffName).HasPhoto=false,SampleImage,Office365Users.UserPhoto(ThisItem.StaffName)))


So could there be a possible workaround implemented for this, as i imagine plenty of organizations will want to keep records of non-personal data on employees who have left their organization.



Status: New
Community Champion


We are working to resolve issues with Office365Users.UserPhotoMetadata connector.

At this time, please use the UserPhotoV2 endpoint and comment out the use of UserPhotoMetadata.

Not applicable

@mr-dang, thanks for your response, but i had already tried this as an alternative and still get an error.



Frequent Visitor



I have exactly the same issue when someone has left the organisation and no longer have a GUID in AzureAD.


Is there a workaround yet?




Not applicable

Hi @alunhughes 


i haven't been updated on a workaround yet, no. It turns out the owner of the system didn't need the feature i was using so i removed it shortly after raising this post.