Notifications
Announcements
No record found.
Is there a way to access the currently logged in user's email in a model-driven app? I can see ways to do it in a canvas app, and I can get the user's id and name using XRM in web resources, but so far I have yet to find a way to access the email address that way.
Thanks!
Hello,
You can use following code to receive email of current user:
Xrm.WebApi.retrieveRecord("systemuser", Xrm.Page.context.getUserId(), "?$select=internalemailaddress").then( function(t){ console.log(t.internalemailaddress) });
This is perfect, thanks!
Hi Andrew,
I appreciate this is an older comment, will this work as a JS function inside a model driven app trying to use it as an OnLoad event?
It should work fine. One thing to correct is getting the userid - docs.microsoft.com/.../usersettings
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 73 Super User 2025 Season 2
Gerardo RenterÃa Ga... 43 Most Valuable Professional
Daniyal Khaleel 32 Most Valuable Professional