When you set up multiple brands, security settings only allow you to set up one single URL for remote logins. This might be problematic if you have different user databases for each of your brands.
The approach described in this article allows you to create a script between Zendesk and the SSO login script in your server that will allow you to route your customers to specific URLs based on which brand they are trying to log in to.
This procedure assumes that you have already configured JWT on your server. Otherwise, make sure that you follow the instructions listed in the article Enabling JWT single sign-on first.
This example in this article uses PHP, but you can adapt it to other languages if you need to.
This article contains the following sections:
- Two or more brands or more set up
- Two or more user authentication systems set up with JWT SSO
- The scripts
- Update security settings
- Important considerations
- Troubleshooting
Two or more brands set up
You need to configure at least two brands to follow this procedure, if you haven't already. For details, see Setting up multiple brands. After you set it up, save the brand URL and the host-mapped brand URL. You will use them in the script later.
Two or more user authentication systems set up with JWT SSO
You need to have set up and configured JWT SSO on your user authentication systems. You can do one for each brand already, but bear in mind that the shared secret that you obtain from security options will have to be the same in all your authentication systems.
Save the login URL and logout URL along with the information from the previous section.
The scripts
Your list of saved URLs might look like this:
Brand 1
Non-Hostmapped URL: https://brand1.zendesk.com
Hostmapped URL: https://support1.example.com
Brand 2
Non-Hostmapped URL: https://brand2.zendesk.com
Hostmapped URL: https://support2.example.com
System 1
Login URL: https://page1.example.com/zdlogin.php
Logout URL: https://page1.example.com/zdlogout.php
System 2
Login URL: https://page2.example.com/zdlogin.php
Logout URL: https://page2.example.com/zdlogout.php
Next, create the script. Remove the https:// from the URL for each brand URL. Keep them on the website links.
You can also find the scripts here:
Login script
<? $brand_URLs = array( "brand1.zendesk.com" => "https://page1.example.com/yourcustomloginjwtscript.php", "support1.example.com" => "https://page1.example.com/yourcustomloginjwtscript.php", "brand2.zendesk.com" => "https://page2.example.com/yourcustomloginjwtscript2.php", "support2.example.com" => "https://page2.example.com/yourcustomloginjwtscript2.php" ); foreach($brand_URLs as $k => $v){ if(strpos($_GET['return_to'],$k)){ header("Location: ". $v); die(); } } ?>
Logout script
<? $brand_URLs = array( "brand1.zendesk.com" => "https://page1.example.com/yourcustomlogoutjwtscript.php", "support1.example.com" => "https://page1.example.com/yourcustomlogoutjwtscript.php", "brand2.zendesk.com" => "https://page2.example.com/yourcustomlogoutjwtscript.php", "support2.example.com" => "https://page2.example.com/yourcustomlogoutjwtscript.php" ); foreach($brand_URLs as $k => $v){ if(strpos($_GET['return_to'],$k)){ header("Location: ". $v); die(); } } ?>
Update security settings
- In Admin Center, click
Account in the sidebar, then select Security > Single sign-on.
- Click Create SSO configuration then select JSON Web Token.
- Enter a unique Configuration name.
- For the Remote login URL, enter the URL for the login script.
- For the Remote logout URL, enter the URL for the logout script.
- To avoid conflicts in case some of your customers have an account in more than one user authentication system with the same email address, you can set Update of external IDs to On.
- Provide the Shared secret to your IT team. They'll need it for their JWT implementation.
- Save your changes.
Important considerations
Consider the following:
- Security risk is low if you use the script as-is. If you modify it extensively other than the changes mentioned here, you may create a security vulnerability on your own server (not Zendesk’s).
- Since we only provide one JWT Token, all your SSO Scripts will use the same tokens in your authentication systems. If one of your systems is compromised, it may lead to all of your brands being compromised.
- If you get an "Invalid JWT Request" error when you try to SSO, refer to the Troubleshooting instructions below.
Troubleshooting
To prevent invalid JWT request errors, hardcode https://(defaultsubdomain).zendesk.com/ as /access/jwt?jwt=
for both brands where (defaultsubdomain) is your main brand subdomain. For example, mydomain.zendesk.com.
- Hardcode https://(defaultsubdomain).zendesk.com into the SSO script, so the JWT payload always gets sent to https://(defaultsubdomain).zendesk.com/access/jwt
- Implement that snippet into the script to use 'return_to' so the end user is redirected back to the origin Help Center. Make sure to append the payload for both brand marking URLs as fixed as '(defaultsubdomain)' and append 'return_to'.
The snippet for your reference:
if(isset($_GET["return_to"])) {
$location .= "&return_to=" . urlencode($_GET["return_to"]);
}
30 comments
Gerald B.
Hi Sarah.
Apologies for the wait regarding your question.
User passwords are not brand restrictive within Zendesk. You would need to implement custom routing based to the brand URL that you created. You can also toggle the SSO setting for end users to "Let them choose" which would give them the option for a Zendesk Login or SSO. You can customize the SSO button's text to signal they users to sign in using the correct method.
https://support.zendesk.com/hc/en-us/articles/5380943678106-Giving-users-different-ways-to-sign-into-Zendesk
I'll set this to Solved for now, but if you have an further questions, please raise a ticket and we will be happy to help troubleshoot for you.
0
Gerald B.
Thank you for contacting the Zendesk Support Advocacy team. My name is Gerald and I'll be assisting you today.
I understand that you want to setup a method to allow agents and admins to reset their passwords by brand. I'm looking into options for you now.
0
Sarah Cullerton
Have this set up but have run into issues with the password reset loop. Brand 1 is SSO redirecting to /access/normal for those attempting to access Brand 2. We're able to get through admin managed password resets through the /password end point but anything going through the /verification endpoint like welcome emails or users resetting their own passwords for Brand 2 gets bounced to SSO. Any advice here so that we aren't relying solely on admins to manage end user credentials for an entire brand?
0
Marco
@ Chris
I think the answer is YES to both questions one and two. The big issue with Zendesk is that you have one single User Registry and one single Authentication status for the whole account. So, if you log into Zendesk via the Brand 2, you are automatically logged in Brand 1 as well. It doesn't matter if you're logged in via SSO or not, you are just authenticated, stop!
The only work-around I see is to restrict access to HelpCenters based on Users/Organizations tags (Users segmentation).
Let's hope to get some better official answer from Zendesk...
0
Chris Fassano
I have some questions regarding this scenario.
1. If a user is created through the SSO option via Brand 1, and then later goes to Brand 2 to log in, would they be presented with the option to reset their Zendesk password?
2. If yes, does that mean they would be able to log into Zendesk via the Brand 2 help center by using their Zendesk credentials rather than their 3rd party SSO credentials?
1
Tony Felicetta
Hello, I have been watching this thread for some time, and through various web searches have been unable to clearly define the steps needed. I am looking for an A-B-C checklist, I have most of it together but then it drops entirely at implementing the JWT login scripts.
For example:
1. Configure Okta SSO JWT authentication within Zendesk (COMPLETE)
2. Configure Multiple Brands within Zendesk (COMPLETE)
3. Configure Multiple Help Centers > 1 or 2 per brand (COMPLETE)
4. FACT - we are using Okta as the SSO solution passing the JWT to Zendesk (confirmed working) -- NEEDED is dependent upon the users email domain (@domain111.com, @domain222.com) this would direct the user to the necessary Help Center
5. QUESTION - where should the proposed login scripts reside, Zendesk or Okta or? This step is very vague and does not seem to describe "how" the JWT identifies the logged in user to direct them to the appropriate help center. For example, a user with email @domain111.com would be directed to support-domain111.zendesk.com , similarly if the user email domain is @domain222.com then they would be directed to support-domain222.zendesk.com .
0
Joyce
I can see that you open a messaging request for this concern and were advised to create Product Feedback for your use case.
0
Jason Wong
When setting up a JWT for end users to login vs. agents with SSO. the login page is missing the forgot password link. Any way to add that back? Our customers are unable to request a password reset.
0
Julio H
Currently, you can allow the end user to choose among several SSO options (Google, Microsoft, custom SSO...) or Zendesk default authentication (username and password).
For more information, please visit: Providing multiple sign-in options for team members and end users.
Unfortunately, there is not a simple way to achieve this. However, this could be possible to achieve, but using JWT and your own custom authentication. They customer A and B must login to your custom authentication system, and then via JWT, allow them to access Zendesk.
Or redirect all the login request to the SSO landing page, where you can have an option for them to select their type of account and show the login option for that type of account.
If you're this link: subdomain.zendesk.com/access/normal you will be able to only allow the user to login with username and password.
In any case, currently, this is not possible within Zendesk settings.
I've marked this conversation as product feedback for review, which means that your input will be aggregated as a part of our Voice of the Customer program that provides customer feedback to our product development teams.
In addition, I encourage you to create a new post in the General Product Feedback topic in our community to engage with other users who have similar needs and discuss possible workarounds. Conversations with a high level of engagement ultimately get flagged for product managers to review when they go through roadmap planning.
Specific examples, details about impact, and how you currently handle things are helpful for our product teams to understand the full scope of the need when working on solutions. You may also want to review the Product feedback guidelines and how to write an effective feedback post [https://support.zendesk.com/hc/en-us/articles/4413820079386-Giving-Product-Feedback-at-Zendesk-].
We truly value customer feedback and your voice and votes in the forums help influence future Zendesk functionality.
Greetings.
0
Naoki Tanaka
ご質問の投稿ありがとうございます。
該当の件ですが、特に推奨はございませんので利用者がアクセスできるサーバーに当該のスクリプトが動作するページを作成いただければと思います。
ご確認よろしくお願いいたします。
0
Sign in to leave a comment.