Service Bridge Registration Errors - 'Key Exhange Request failed..'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 08:59 AM
I am attempting to set up Service Bridge between 2 demo instances. While trying to connect the instances I am running into the following issue:
After creating the Consumer Registration in the provider instance I have followed the link in the email and created the Provider Connection record in the Consumer instance. First issue to note is that the 'Save' UI action appears not to work and I instead have to save by right-clicking the header (although this may just be related to the demo instances being slow-responding).
After saving the record the following error messages occur:
Following this, the 'Retry Key Exchange Request' and 'Connect to Provider' UI actions appear to do nothing so I am essentially stuck at this step.
My current set up with respect to users/accounts is the following:
- I am logged into both instances with my local admin accounts, same username/email/password
- In the Provider instance my account is associated with the company/account used in the Consumer Registration record, and I am listed as a contact in the account record.
- In the Consumer Registration record (in the Provider instance) I am listed in the Contact field
Just to clarify this is for the non-legacy Service Bridge (sn_sb_con & sn_sb_pro)
Any help is appreciated

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 03:47 AM
Having exactly the same issue - the UI actions do not react when clicked. There is a new KB article that describes how you need to delete a script include, then XML import an updated one manually. Made no difference, aside from clearing the error message that links to this article.
Tried a new registration record by following steps in here, entering the Consumer Instance ID, URL, Company, Contact which then generates an email and link for the Consumer to then enter. Again, the UI actions dont react (perhaps missing script libraries??), but as an admin, you get the context menu "Save" UI action - click that and you then get the same error: "Key Exchange Request failed sending to source instance for approval."
The Form "Save" UI action has client-side script, that has the following:
function requestKeyExchange() {
ScriptLoader.getScripts('sn_sb.KMFUtil.jsdbx', function() {
sn_sb.KMFUtil.getHealth(getKMFHealthResponse);
}, function() {
g_form.addErrorMessage(getMessage('Unable to send KMF Key Exchange'));
});
}
function getKMFHealthResponse(response) {
var result = response.responseXML.getElementsByTagName('xml');
var answer = JSON.parse(result[0].getAttribute('answer'));
if (answer.health !== 'GREEN' && answer.warnings.length > 0) {
g_form.addErrorMessage(getMessage('Key Management Framework Health Warnings: {0}').withValues(answer.warnings));
} else {
var match = g_form.getValue('url').match(/^(https?\:)\/\/(([^:\/?#]*)(?:\:([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);
var sourceHost = !!(match[3]) ? !!(match[4]) ? match[3] + ":" + match[4] : match[3] : g_form.getValue('url');
sn_sb.KMFUtil.keyExchangeRequest(sourceHost, g_form.getValue('instance_id'));
}
gsftSubmit(null, g_form.getFormElement(), 'sysverb_insert_and_stay');
}
if (typeof window == 'undefined')
updateAndRedirect();
function updateAndRedirect() {
current.insert();
action.setRedirectURL(current);
}
Has anyone got past this issue, yet?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 04:00 AM
I've had a dig through several scripts now and it seems like the HTTP request in the sn_sb.KMFUtil isn't being sent correctly. The error message appears to be being generated by the 'Populate Scratchpad' business rule, which is returning an error when it's query of the Resource Exchange Requests table returns empty so I am assuming we are not sending a request to the customer instance at all.
I have raised a ticket with ServiceNow as having tried with multiple instances and now hearing of others having the same issue it might be related to their latest update of this plugin (which was only last week I believe). My only suggestion is perhaps to try using an older version of the plugin? Wish you all the best

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 05:08 AM
Sam - think i'll do the same!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 06:13 AM
I have now solved this. The users who are configuring on the Provider and Consumer side both must have KMF roles. To grant yourself the KMF admin role, there is a UI page, accessible by module. use that to grant the role:
1. Elevate roles to gain security_admin access.
2. Navigate to System Security>Key Management Administration (this is the UI page)
3. From the available users slush bucket, add in the admins to the "Selected Users" bucket, and save
4. Make sure this is done on both Provider and Consumer instances
(it is actually "sn_kmf.cryptographic_manager" role needed, but to get that role requires a user with "sn_kmf.admin" to grant it)
5. Be sure to log out/in of both instances for the users that have the kmf roles
6. Carry on with the steps from docs
6.a. Provider instance: https://docs.servicenow.com/csh?topicname=service-bridge-v2-configure-provider.html&version=latest
6.b. Consumer instance: https://docs.servicenow.com/csh?topicname=service-bridge-v2-install.html&version=latest
You dont need to follow the "Configure Key Exchange" docs article at all - just make sure both users in each system have the KMF roles, and then following docs, the key exchange happens for you.
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 06:04 AM
Hello @samtrobo, @Chris Chambers1, @pooja keshari, @SrdanMatijevic !
I am also facing the same issue. Can you please tell me how to resolve it?