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 :
Finance | Project Operations, Human Resources, ...
Suggested answer

impersonate

(0) ShareShare
ReportReport
Posted on by

how can i as admin impersonate any user in d365 F&O.

I have the same question (0)
  • Martin Dráb Profile Picture
    236,570 Most Valuable Professional on at
    RE: impersonate

    What are you trying to achieve from the business point of view?

  • singhr Profile Picture
    on at
    RE: impersonate

    i m trying to impersonate a test user with the help of this code .

    docs.microsoft.com/.../xpp-session-run-time-functions .            runas

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: impersonate

    Moved to D365 Finance forum.

    You already found the product documentation, and "runAs" method. So, is your question now answered?

    But, if you simply want to test the system as another user, you can login to the system with the test user's credentials. Simple and powerful.

  • singhr Profile Picture
    on at
    RE: impersonate

    i m unable to do that . this is new for me.could you please elaborate me how to do that.

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: impersonate

    Login using test user credentials is 100% identical to the process of login using Admin credentials. The login process is the same, regardless of user account.

    1. Start your web browser

    2. Navigate to the D365 URL

    3. If you are logged in as Admin user, logout

    4. When the system asks you for credentials, input the credentials of the test user.

  • singhr Profile Picture
    on at
    RE: impersonate

    no i mean how to write the code .

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at
    RE: impersonate

    Hi singhr,

    Have you checked this link? It has an example on how to use "RunAs".

  • singhr Profile Picture
    on at
    RE: impersonate

    if i have to impersonate with the help of runas() then how can i able to do that

  • nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: impersonate

    Hi singhr,

    I trust you already checked the suggestions above. Can you comment on them? Were they useful? What did you learn? Do you still have some questions on some areas?

    If you could summarize this it would be great. Thanks!

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 813

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 738 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 566 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans