Hi,
Some help please, Ive created a flow that sends an email to a contact within D365 that has an invite code for them to redeem, a URL to the site with the invite code which will be populated in provided box when clicked or the site URL they can paste into browse. All working fine, when code is entered and button clicked, page redirects to sign in, Azure AD is only sign in I want to use so all other removed, when this button is click, successfully signs in (role is assigned through invite), however once signed in it redirects to the redeem invite page (Register), I can click the navigation and go to any page but I want it to redirect on sign in. Here the thing, if i copy the link from the email and paste in browser or the code and enter directly and sign in with Azure AD I'm redirected to my desired page, specified in the javascript, or if I sign in with Azure AD directly if invite previously redeemed, I'm redirected again to specified page, but only if I use the button provided in my email link am I redirected back to the redeem invite page. Ive included screenshots here, hopefully someone knows the answer.
Additional photos added below