404 error subscription not found by pattern Azure Datacenter discovery while runnning cloud schedule ,azure cloud discovery

shivambitanwar
Tera Expert

Hello Experts,

we have enabled Azure cloud discovery of root management group  in our prod environment. Activated the property glide.discovery.cdu.auto_refresh_sub_accounts_and_ldcs  but still its running Azure datacenter discovery for subscriptions that have been deactivated in azure. Getting a lot of 404 subscriptions not found errors for this pattern:Azure Datacenter discovery . How to deal with this situation. My understanding is subscriptions got discovered when they existed but now it has been deleted. so it should not try to discover datacenters for these subscriptions. 

However, thats not the case, it is considering these non-existing subscriptions and throwing erros.  my question is can this be automatically handled that if the subscription is not found in azure , it should not be part of Cloud Discovery running on management group? . 

Error details : 

 Status: 404 Response: {3} (script_include:AzureApiCommand; line 137). Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.

If i try to access the said subscription via POSTMAN i get the same error, 404 subscription not found

 

7 REPLIES 7

shivambitanwar
Tera Expert

cc @Ram Devanathan 

Ram Devanathan1
ServiceNow Employee
ServiceNow Employee

Are the subscriptions still part of the management group? if so, these will get picked up.

They are deleted or inactive in azure prod.

@Ram Devanathan  So i have 807 subscriptions in Azure portal(i have reader access ) and 806 in servicenow . 12 subscriptions give 404 error subscription not found while running pattern:Azure Datacenter discovery.

 

when i search in azure portal these subscriptions are not found . my question is how do we remove such subscriptions from being included in schedule?