Discovery Subscription Error : Failed to execute API - Missing service principal field: ClientId - if your Azure credential (service principal) was imported, please restart your MID server and try again

RamSagar
Tera Guru

Discovery Subscription Error : Failed to execute API - Missing service principal field: ClientId - if your Azure credential (service principal) was imported, please restart your MID server and try again.

We had cloned our sub prod instance and upgraded to Paris, after upgrading the cloud discovery is not working and getting the above error.

I had deleted the cloned credentials from prod and re created and restarted the MID Server, but still same issue. is anything newly introduced in Paris version.

Same credentials are working fine in production.

11 REPLIES 11

I also rekey-ed the MID Server this was the solving step in my case.

terrywang
ServiceNow Employee
ServiceNow Employee

Please review MID Server agent log to see if there's error similar to below:

An error occurred while decrypting credentials from instance

 

Most common cause for this error is below:
1> There are invalid credentials on the instance

2> MID Server keystore is corrupted

 

For case 1> please try to open discovery credentials one by one to make sure there's no error when opening the records.

If you are receiving error or it shows record not found, you can run below background script to reclassify the invalid credential:

var gr = new GlideRecord('discovery_credentials');
gr.get('xxxxxxxxxx'); //replace xxxx with the sys_id of the credential
gs.info(gr.name);
gr.sys_class_name="discovery_credentials";
gr.update();

Once reclassified the records can be manually deleted.

 

For case 2> please try rekey first, then try invalidating / validating the MID server

 

===

Once above is done, restart MID server and confirm no more "decrypting" error popping in agent log

Deepanshu Grov1
Tera Contributor

Hi 

 

Were you finally able to resolve this issue as I am in exact same situation at the moment, maybe your solution saves my time 🙂

Karim Kabbara1
Tera Expert

Hi,

 

Any resolutions for this issue?

 

Thanks in advance!

snow commnity u
Tera Contributor

Hello ,

 

Does any one found the solution for this issue facing the same error.

 

It will be great help