How to get current login user in Iframe web application RRS feed

  • Question

  • Hi All,

    I using a asp web application form in the Iframe of CRM Form. I am doing all the operation on the entities by opening  context using the admin credentials.  I need to get the current login user  in the Iframe web application . kindly please let me know how to achieve this functionality

    Thanks in Advance.. 


    Tuesday, July 5, 2016 7:27 AM

All replies

  • Which authentication are you using for CRM ?

    If it's Active Directory authentication, then you can enable impersonation in the web application, and have the clients configured to automatically login to the web application (the easiest option is normally to add your web application to their Local Intranet Zone).

    If you have Claims Authentication enabled, then you'll need to make your web application claims aware

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Tuesday, July 5, 2016 4:13 PM
  • There are two Possibility

    1. If You Need in Server Side Code then you can Use SDK Message WhoAmI and get Userdetails
    2. If You need in Client Script you Can use window.parent.Xrm.Page.context.getUserId() and from There u Can get other user related details. Currently usingng Web API we can directly call whoAmI also https://mahenderpal.wordpress.com/2011/05/11/get-current-user-id-and-name-in-javascript-ms-crm-2011/       or https://msdn.microsoft.com/en-us/library/gg309638.aspx

    Thursday, July 7, 2016 5:33 AM