Select different MID Servers for different service accounts using Cloud DiscoveryIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: block; max-width: ; width: auto; height: auto; } } By default, the Cloud Discovery schedule selects a MID Server based on Applications and Capabilities. To select different MID Servers for different service accounts, you can customize the MID Selector Override. The following steps provide code examples for the MID Server selector override configuration. Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: block; max-width: ; width: auto; height: auto; } } Any supported release Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: block; max-width: ; width: auto; height: auto; } } 1. In your ServiceNow instance, go to MID Server > MID Selector Override 2. Locate the record, Override by capability 3. To edit this record, select Open. 4. In the script field, find this line: (function filter(/* MIDServerJS Array */ candidateMIDList, /* MIDServerJS Array */ defaultSelectedMIDList, /* Native JS object */ midSelectorContext, /* MIDSelectorParamJS */ requestedParameters) { 5. Immediately after that line, add the following code: var result = []; if (JSON.parse(midSelectorContext).service_account_id == 'YOUR_SERVICE_ACCOUNT_ID') { for (var mid in defaultSelectedMIDList) { if (defaultSelectedMIDList[mid].sysId == 'YOUR_FIRST_MID_SERVER_ID' || defaultSelectedMIDList[mid].sysId == 'YOUR_SECOND_MID_SERVER_ID') { result.push(defaultSelectedMIDList[mid]); } } return result; } 6. Customize your values by replacing these placeholder values with your actual data: YOUR_SERVICE_ACCOUNT_ID: Replace with your service account ID (not the sys_id) Example: cc0cb784-577a-4943-acc1-4fb487103b77' YOUR_FIRST_MID_SERVER_ID: Replace with your first MID Server system ID Example: af693bf5db7b50108e0d8a8b3a9619a6 YOUR_SECOND_MID_SERVER_ID: Replace with your second MID Server system ID Example: 7fae2614dba77010c2b9b8e2f3961968 7. Review your script for accuracy, and then select Update to save the configuration. Important Notes Use the service account ID, not the sys_id field.This example shows two MID Servers, but you can add more by extending the condition.Test your configuration in a development environment first. The following image shows a completed customized configuration resulting from the previous steps outlined. Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: block; max-width: ; width: auto; height: auto; } } For additional information, see the following documentation. Override the MID Server selection filter Other uses of MID Selector Override: CMP - Use MIDOverride Selection Filter Alternative solutions: How To: Customize Cloud Discovery MID server selection