Hi,
I am new to Dynamics 365, and I have been tasked with configuring external openid connect authentication on a customer portal with our corporate single sign on application. The SSO app has been built on top of IdentityServer3.
I have got the portal and the IdentityServer working together by creating the following portal site settings:
- Authentication/OpenIdConnect/IdentityServer/Authority
- Authentication/OpenIdConnect/IdentityServer/Caption
- Authentication/OpenIdConnect/IdentityServer/ClientId
- Authentication/OpenIdConnect/IdentityServer/ClientSecret
- Authentication/OpenIdConnect/IdentityServer/MetadataAddress
- Authentication/OpenIdConnect/IdentityServer/Scope
- Authentication/OpenIdConnect/IdentityServer/RoleClaimType
And I have created a hybrid client in my Identity Server configuration with matching values. This has enabled me to login to the customer portal using an account in my Corporate Identity Server.
I have inspected the sign in page HTML and the network traffic and have derived the following process:
- /SignIn, click the "Login with Identity Server" button:
- Form posts to https://{{portal url}}/Account/Login/ExternalLogin?ReturnUrl=%2Fsupport%2Fcreate-case%2F
- Submit button contains the value={{Authentication/OpenIdConnect/IdentityServer/Authority}}
- Account/Login/ExternalLogin
- Looks up openid settings for the IdentityServer provider using the value submitted eg: {{Authentication/OpenIdConnect/IdentityServer/Authority}}
- Hits the IdentityServer openid config endpoint to look up the authorization endpoint url
- Constructs an authorization url and returns a 302 redirecting to this url
- 302 redirect
- {{Identity Server authorize endpoint}}?client_id={{portal client id}}&response_mode=form_post&response_type=code%20id_token&scope=openid%20roles%20profile%20email&state=OpenIdConnect.AuthenticationProperties%3Dazh4lUj7407fEISgN3lnxgdUrSV4DtcgLbco0n1mplH1-YRG6qioyI8_IaLX3Din2TieJy-scXR4YFNpeXFCUQaVTC3YmAAfTd1LTw-C05HndSwTERGPE5skay3mrvFkHlmIAm7EGN2hY9Yr1I8wMEcMePQDoELbMxA9x-cYgV9_ceIpjYZKTO5i-i3wXheYuEjjknRQ20IHM7jHL1ILpP_qceimN6LtWLrmHIjtUsa086Tr65sYcZ8KGIEJIbt-UKo7SHOhHM866HTa_9KYxA&nonce=636479778110580666.Y2VhZDIzNzEtMWRlMC00NzA3LTkyNmQtNjlhYzlkNzExNWRlYjA2MTBhMmItN2MwMS00MjYzLWExY2QtOTk0YzRkYjFkYmNi&redirect_uri={{client redirect uri}}
- Identity Server
- Receives this request
- Constructs a signin message
- Redirects to the identity server login page
My next task is to try and pass some additional query string parameters in the authorization request that gets sent by the customer portal to the IdentityServer, so I need to somehow tap into the Account/Login/ExternalLogin method to do this.
Anyone got any ideas how this can be done?
*This post is locked for comments