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)

Location of ADFS 3.0 OnLoad.JS File on disk?

(0) ShareShare
ReportReport
Posted on by 1,589

I just set up a Dynamics 365 On-Prem Environment complete with ADFS and Claims Authentication, and I'd like to make a bunch of adjustments to the ADFS Login Page. To do that, I need to add a ton of code to the OnLoad.JS File that's supposedly part of the ADFS login page.

 Unlike ADFS 2.0 where I can simply go into IIS to see where the ADFS files are located, I can't seem to find the IIS Web Page and JavaScript files for ADFS on Windows 2016.

Everything is default as this is a quick-n-dirty temporary test/demo environment -- I just need to find the onload.js file and am hoping someone here knows exactly where it is.

Thanks!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello Jim,

    Check following - blogs.msdn.microsoft.com/.../customizing-adfs-3-0-sign-in-page

    It would require to use Powershell a bit but that should resolve issues you addressed.

  • Verified answer
    ACECORP Profile Picture
    1,589 on at

    Apparently, the OnLoad.JS file is not editable by default.

    I must first launch powershell and execute

    New-AdfsWebTheme -Name custom -SourceName default


    Then it seems I must execute the following

    Export-AdfsWebTheme -Name default -DirectoryPath C:\MyExportFolder


    Then I can edit the onload.js file at C:\MyExportFolder\scripts\onload.js

    Next, I need to set the them so it uses my custom onload.js file

    Set-AdfsWebTheme -TargetName custom -AdditionalFileResource @{Uri=’/adfs/portal/script/onload.js’;path="c:\MyExportFolder\script\onload.js"}


    Finally, I need to load set the new theme file to active

    Set-AdfsWebConfig -ActiveThemeName custom


    Not as straight forward as opening and editing a javascript file, but it works.

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