Hello everyone,
I just started learning Power Apps and I simultaneously work on an application
I trying to display all the users' peers in a gallery, I first started using the Get Onboard application code and played with it a bit and it worked but when I click on the play mode I get this error.
I tried different solutions found online and nothing seem to work I'm getting really desperate.
Set( MyProfile, Office365Users.MyProfile());
Set( MyUserId, MyProfile.Id);
ClearCollect(
MyPeersList,
ForAll(
Office365Users.DirectReports(Office365Users.Manager(MyUserId).Id),
{
DisplayName:DisplayName,
City:City,
JobTitle:JobTitle,
UserPrincipalName:UserPrincipalName,
GivenName:GivenName,
Mail:Mail,
Id:Id,
Mobile:mobilePhone,
OfficePhone:TelephoneNumber,
Department:Department,
OfficeLocation:OfficeLocation,
Photo:If(
// check if the the user has an email and a profile picture
!IsBlank(Mail) And Office365Users.UserPhotoMetadata(Mail).HasPhoto,
// get the profile picture
Office365Users.UserPhotoV2(Mail),
profile )
}
);
);
Thank you so much for your time