Subscribing Change notification to eventhub in torus fails intermittently with ValidationError Message: Client EventHubs publishing validation failed No such host is known
We recently moved our service to Torus and after moving to Torus our calls to subscribe to graph change notifications has been failing intermittently. I am not sure of the pattern why some tenants succeed and why others fail.
The request is based on this example: https://learn.microsoft.com/en-us/graph/api/subscription-post-subscriptions?view=graph-rest-1.0&tabs=http#request-example and we use the MSGraph .NET SDK
https://github.com/microsoftgraph/msgraph-sdk-dotnet
and it was working without issues previously when the service was running in corp (microsoft.onmicrosoft.com) but after moving to Torus (prdtrs01.onmicrosoft.com) it seems to be failing consistently but also occasionally succeeding.
Is it possible to know what is the reason of these failures?
Here is the sample payload:
POST https://graph.microsoft.com/v1.0/subscriptions
{
"changeType": "updated",
"notificationUrl": "EventHub:https://xxxx.vault.azure.net/secrets/xxxxx?tenantId=prdtrs01.onmicrosoft.com",
"resource": "/groups/?$filter=securityEnabled eq true",
"expirationDateTime": "2023-07-19T23:00:00.0000000Z",
"clientState": "clientState"
}
here is the error message:
Status Code: BadRequest
Microsoft.Graph.ServiceException: Code: ValidationError
Message: Client EventHubs publishing validation failed No such host is known
Inner error:
AdditionalData:
date: 2023-07-16T23:49:33
request-id: 1df0b48f-aae3-442b-b37b-8b3a4961f4e2
client-request-id: 1df0b48f-aae3-442b-b37b-8b3a4961f4e2
ClientRequestId: 1df0b48f-aae3-442b-b37b-8b3a4961f4e2
at Microsoft.Graph.SimpleHttpProvider.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
at Microsoft.Graph.BaseRequest.SendRequestAsync(Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)
at Microsoft.Graph.BaseRequest.SendAsync[T](Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)
at Microsoft.Graph.SubscriptionRequest.UpdateAsync(Subscription subscriptionToUpdate, CancellationToken cancellationToken)
.......