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)

Open an external webpage, login and redirect to a custom url

(0) ShareShare
ReportReport
Posted on by 235

Hello all,

I am looking a way to:

  1. open an external login web page (external static url) clicking on a ribbon button
  2. Make an automatic login 
  3. And make an immediately redirect to a dynamic url page inside the private area of that webportal.

I have found a walk around to get the first and the second points, but then i lose the web page control and i can't redirect. 

Someone knows the best practice to do that?

Thanks a lot!

BR,

Davide

*This post is locked for comments

I have the same question (0)
  • J Matlon Profile Picture
    1,465 on at

    Davide,

    How are you authenticating?

    The scenario you are describing sounds very similar to how ADFS 1.0 worked. If users didn't have a valid claim, they were redirected to an ADFS server for authentication. Then ADFS would redirect them back to a URL that was passed as a parameter.

    It sounds like you want to redirect to an external page, allow them to login, and have that external page redirect to a URL.

    I think you could only do this either through using an IFRAME (which would likely be problematic), or if your external login page allowed you to pass a URL to redirect users to after they authenticate.

    Without knowing the details of your authentication mechanism or your external authentication service, its hard to know best practice.

  • Davide Cerqua Profile Picture
    235 on at

    Ok so i can use an IFrame,

    that login web page has only 2 input tag (id="username", id="password")

    how can i pass the values for these tags and then execute like

    document.getElementById('login').submit();     ?

    I think it is possible do that easily,

    but i could loose the control of the external webpage so the redirect it won't work...

  • Verified answer
    J Matlon Profile Picture
    1,465 on at

    If your webpage is external, you would be using cross-site scripting. This is controlled at the browser level, and usually locked down because of security.

    If this isn't a problem for you, then you can grab your IFRAME as an object and call jscript on that IFRAME.

    document.* will only work against the DOM on the page the jscript resides.

    You would have to call jscript through your IFRAME object (ex. myIFRAME.getElementById('login').submit(); )

    Is your external authentication source giving you a claim?

    Usually its a better practice to redirect to the external login page, and pass a URL for the login page to redirect back to. Or to use your external authentication site's API to build a local script to pass to the external site for authentication.

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