
Announcements
I'm using the persona component from Power CAT code components and have a couple of issues.
Image:
I cant get the users image to show using the code
Office365Users.UserPhotoV2(First(Office365Users.SearchUser({searchTerm:"user@user.com"})).UserPrincipalName)
If I use the above in an image components the image displays correctly. But for the persona image field it does not.
the documentation says PersonaImgUrl - Url or Base64 Content of Persona Image(Profile Picture).
User().Image does work, but displays my image
Status:
What would be the easiest way to get the users status?
I know this can be done using the graph API (Here)
but it is quite slow, and I need multiple requests if my page has multiple personas on it.
Is there another way?
I have kind of got the image to display by converting it to base64
Set(
BinaryImageData,
Substitute(
JSON(
Office365Users.UserPhotoV2(First(Office365Users.SearchUser({searchTerm: Gallery1_3.Selected.GM.Email})).UserPrincipalName),
JSONFormat.IncludeBinaryData
),
"""",
""
)
)
The code above uses an email address from a gallery to look up the user image in Office365Users, then converts it to base64.
But! it can only be used as part of an action, not directly in the image field as it gives this error.
As the number of persona images is dynamic, this isn't going to work.
Thoughts?