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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Send user information to httpcontext.current.user.Identity

(0) ShareShare
ReportReport
Posted on by 205

Hello All,

I have an aps.net webapp to which i am redirecting on a click of a CRM button. On the webapp when i am trying to access user data with httpcontext.current.user.Identify it is dosent return any data. Is it possible to send user information to the webapp vis httpcontext? If yes how do we do that.

CRM version is CRM 2016 on premise.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Suresh,

    How you are redirecting to custom Web App , is it using window.open?

    If yes  you can get the Xrm object using  window.parent.opener.Xrm

    Here is sample code to get userid -

    window.parent.opener.Xrm.Page.context.getUserId();

    In addition you can also access CRM current entity data in client side using  window.parent.opener.Xrm

    Check here what you get from context -

    https://neilparkhurst.com/2016/08/03/crm2016-javascript-context-object/

    Hope this helps.

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Suresh,

    I don't thin k you will get data in HTTP Context as this is just opening a page and the values depend upon how you have set up the authentication on your web app. If you are openeing the web app from a button within crm using JavaScript then you can retrieve the details within crm using the JavaScript and then pass it as query string.

    You cna refer the above shared article on how to query CRM data using JavaScript.

    Hope this helps.

  • Suresh_Satti Profile Picture
    205 on at

    Thank you all, i used the query string logic to pass user's GUID and used Response.Redirect() methods to keep the GUID consistent all across the webapp session.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans