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)

How to get current logged in user session id in javascript and how I can validate it?

(0) ShareShare
ReportReport
Posted on by

Hi,

Here is my situation, in my js web resource I need to call external web services hosted somewhere else to read/write data to external system. I want to have some kind of user authentication on these web services side so these web methods only serve valid CRM user client not everyone. My question is if there is a way to pass something like a CRM user session id to these external web services then these external web services can use CRM sdk to validate the session id(or so called token).

Thanks in advance,

Lan

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    ManirajKV Profile Picture
    1,477 on at

    Hi,

    You can get the current user id and pass the user id to external system, verify the user belongs to crm or not.

    Hope this link may show some light for ur requirement.

    www.powerobjects.com/.../dynamics-crm-portal-authentication-methods

  • Community Member Profile Picture
    on at

    Hi Maniraj.K.V,

    Thanks for your suggestion. But I think validating client via passing user id is very easy to hack and not secure enough. Does CRM provide something like getting current logged in user session id or token which has a time expired mechanism ? Also this session id can be validated via CRM SDK on server side. Is it possible? Any other ideas or solution?

    Thanks,

    Lan

  • Community Member Profile Picture
    on at

    Hi Izhang, I'm facing the exact same challenge. Did you find a solution?

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