Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

How to Obtain the GUID of a User that is authenticated in a Portals website

Posted on by 10

Hi Folks,

In order to identify a user with a partner app I need to get the GUID of a user that is signed into Portals website.

I need this GUID for a javascript function that I've added to the Portals website pages but it's not clear how I can obtain the GUID.

I see the signed in user name within the page source code but not the GUID and I can't find the user GUID within the session or local storage data either.

The only way I can think to get it is to decode the JWT held in storage, possibly with a JWT library and parse it's contents  but I'm hoping there is a simpler solution.

Thanks,

Rob

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to Obtain the GUID of a User that is authenticated in a Portals website

    Hi Rob, 

    The user who can login portal is one contact recod in the CRM.

    You can use Liquid objects to access the dynamic content of CRM entities.  

    For example, there is an object called "user". You can access full name of the user as {{user.fullname}} 

    So you can use the attribute logical name of the contact entity and access any attribute. If you want to access email id, {{user.emailaddress1}}. Similarly, Guid can be accessed {{user.contactid}}

    Solved: Unable to get User Email id or User GUID (Azure AD... - Power Platform Community (microsoft.com)

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans