web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Currently logged in user's email address in model-driven app

(0) ShareShare
ReportReport
Posted on by 45

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!

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Currently logged in user's email address in model-driven app

    Hello,

    It should work fine. One thing to correct is getting the userid - docs.microsoft.com/.../usersettings

  • BridgeInbetween Profile Picture
    10 on at
    RE: Currently logged in user's email address in model-driven app

    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?

  • chillzilla Profile Picture
    45 on at
    RE: Currently logged in user's email address in model-driven app

    This is perfect, thanks!

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Currently logged in user's email address in model-driven app

    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)
        });

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
DAnny3211 Profile Picture

DAnny3211 136

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 130

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 70 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans