Use Case: Our org have users coming from 2 sources using SSO. There are some common users between these sources. If user is coming from Source A, lets say landing app after SSO should be "Sales" and if user coming from Source B, landing app should be "Services". Both sources are ready to add a URL param/ Query Param (relay state) in the url which I am planning to use post SSO authentication.

We have 2 separate profiles for users from both sources but as mentioned above there are some users who needs access to data based on which source they are trying to authenticate from. Both these profiles have default app set on their profile correctly but the problem is for common users.

What I tried so far: Implement login flow so anytime user of these 2 profiles login, after authentication, I will land them on "Staging" visualforce page and on this page I want javascript or apex or something to change the user's landing app. Note that users are using salesforce lightning experience.

I tried changing landing app through javascript on staging page but didnt find enough information on how to achieve this. Can someone point me any source for this or if there is any other way to achieve this ?

Note that I also tried switching user profile on staging page after authentication. But switching profile require users to have Manage Users permission which I dont want to give. So I believe this option is out of picture

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.