<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 25, 2016 at 1:09 PM, Mr. Christopher Bland <span dir="ltr"><<a href="mailto:chris@fdu.edu" target="_blank">chris@fdu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":18u" class="a3s" style="overflow:hidden">I have been tasked with authenticating Azure AD (cloud only) accounts and on premise AD accounts with the same domain name (@<a href="http://contoso.com" rel="noreferrer" target="_blank">contoso.com</a>) in Office 365. At present thanks to the great Microsoft Interop docs I have Office365, AD, and Shibboleth working together. My plan is to deploy a SP with lazy session so I can detect existing session and forward authenticated users accordingly. For unauthenticated users => collect username using a php form local to the SP => Check to see if they are an AD or Azure AD account using Graph API calls (still working on the Graph API authentication portion) => Redirect on prem AD accounts to Office365 using IDP inititated session.<br>
<br>
Due to the fact that I need to capture the username for my decision based logic I don’t want to prompt the user to enter the username a second time. So I am trying to figure out how to pass it as part of my IDP initiated session URL. I looked at previous posts and it looks like this has been done but it is unclear how.</div></blockquote></div><br>Perhaps I am missing something; however, if the only goal is to pre-fill the form (i.e., you don't really care how it gets there), and the cookie domains of your PHP script/SP are compatible with your IdP, it seems you could set a cookie that you then grab to set j_username in the login form. (In my setup, with BigIP load balancers in front of my IdPs, I could do something akin to what Scott suggests: I'd strip off any desired query string parameters, add them as cookies, and then pull the cookies out in the login form.)</div><div class="gmail_extra"><br></div><div class="gmail_extra">Greg</div></div>