Base solution for your next web application
Open Closed

No Web Hook Subscriptions from WebhookSubscription/GetAllSubscriptions but will retrieve with GetSubscription #9595


User avatar
0
tbentley created

I am running AspNetZero v9.0.1 on .Net core and Angular

I log in as the host and I have been able to add a Webhook subscription and can retrieve it using Swagger https://localhost:44301/api/services/app/WebhookSubscription/GetSubscription?subscriptionId=359EA8AC-8B77-4997-8F89-xxxxxxxxxxxx { "result": { "tenantId": 5, "webhookUri": "https://webhook.site/761e8496-2e28-4e1d-844a-xxxxxxxxxxxx", "secret": "27f232be-3ee4-4791-b91d-xxxxxxxxxxxx", "isActive": true, "webhooks": [ "App.NewDeliveryOrder" ], "headers": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }, "id": "359ea8ac-8b77-4997-8f89-xxxxxxxxxxxx" }, "targetUrl": null, "success": true, "error": null, "unAuthorizedRequest": false, "__abp": true }

But when I call https://localhost:44301/api/services/app/WebhookSubscription/GetAllSubscriptions The response is: { "result": { "items": [] }, "targetUrl": null, "success": true, "error": null, "unAuthorizedRequest": false, "__abp": true }

I get no subscriptions. I should at least get the one above. There are no errors in the AuditLog.

Any ideas? Thanks... Terry


2 Answer(s)
  • User Avatar
    0
    musa.demir created

    Hi @tbentley The main problem here is you are trying to acces to a subscription which belongs another tenant from host. It is normal that you dont see any subscription in GetAllSubscriptions's result. But it is anormal that you see a subscription in GetSubscription's result. GetAllSubscriptions and GetSubscription both must filter the result by tenant and return it. But it seems there is some problem. Let us check it.

  • User Avatar
    0
    musa.demir created

    Resolved by https://github.com/aspnetboilerplate/aspnetboilerplate/pull/5811