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

Notifications

Announcements

No record found.

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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans