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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

SiteMap Navigation - HTML Web Resource - Deprecation of clientglobalcontext.js.aspx

(1) ShareShare
ReportReport
Posted on by 242

Hello,

On the SiteMap of our model driven app. We have navigation items that use an HTML Web Resource to redirect to an Azure Hosted Website that works alongside our Model-Driven App. 

In that HTML Web Resource we have to use the clientglobalcontext.js.aspx to get a reference to the Global Context to get the current Dynamics Logged-In User.

That User ID alongside some configuration information stored in the Dataverse table enables us to create a Custom Redirect URL for that user to the other site. 

With the proposed Deprecation of clientglobalcontext.js.aspx in October 2022.

https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/getglobalcontext-clientglobalcontext.js.aspx

I am trying to determine how to implement this functionality going forwards.

The alternatives suggested:

1. Power Apps Component Framework - From what I have seem - I don't think you can have a PCF control bound to a SiteMap Navigation item. Unless I am missing something?

2.  Custom Pages - Again, as far as I can see. Cannot be associated with a SiteMap Navigation item.

We are calling a stand-alone web resource from the SiteMap here. So, workarounds such parent.Xrm.* will not work as the Web Resource is not hosted on a form.

Is there an alternative Library available to allow us to retrieve the Global Context in an HTML Web Resource?

Best Regards,

Shaun Harvey

I have the same question (0)
  • Suggested answer
    Pradeep Rai Profile Picture
    5,489 Moderator on at

    Hi Shaun,

    try by passing logged user details through URL data parameters as described in below link:

    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/sample-pass-multiple-values-web-resource-through-data-parameter?view=op-9-1

    Thanks,
    Pradeep

  • Shaun W Harvey Profile Picture
    242 on at

    Pradeep,

    If the SiteMap could supply the userid of the currently logged in user. Then that could certainly work.

    However, the SiteMap doesn't include that data. Even when the "Parameter Passing" option is ticked.

    The soon to be deprecated GlobalContext object allows me to retrieve the userid of the person logged into Dynamics., which is what I need.

    If you know a way of accessing that information in a different way from within the HTML Web Resource itself, I'd be interested to know.

    Thanks,

    Shaun

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 > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 98 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 72

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans