Get Current User Information in Canvas Apps.

Follow my blog for more interesting topics on Dynamics 365, Portals and Power Platform. For training and consulting, write to us at info@xrmforyou.com

The introduction of Canvas Apps have completely changed the way of developing apps. App development was always a developer’s paradise. With canvas apps, it’s a level playing field for developer and Power Users alike. And that’s why, I find more and more users from company joining the bandwagon.

And toeing the line, am back with another blog on Canvas apps. In this blog, I am going to walk you on how to get currently logged in User related information in Canvas Apps. Canvas apps provide an in-built method – User() to fetch user related information in Canvas apps. Let’s explore the various functionalities available with User() function.

For this blog, I have created a sample Canvas app to show User related information. Let’s find out the important ones.

  1. Image

The first important property of the User() function is to show the image of the current user. You may be wondering, OH MY GOD! Not one more time with the byte content. The truth is, with Canvas apps, all you need to show the image is a property called Image of the User Function.

In the above screenshot, I have used the Image field on the form and set it’s Image property to the formula – User().Image. Similarly there are other properties like FulName and Email which you can use with the User() function.

As crazy as it may sound, some of the commonly used properties like first name, last name etc. are not available in User() function as of the time of writing this blog. However I am quite sure that in the future, we will see improvements in this API as well just like it happened with so many other API’s.

Related topics

Hope this helps!

Debajit Dutta (Business Solutions MVP)