question

BrianEngen-7864 avatar image
0 Votes"
BrianEngen-7864 asked BrianEngen-7864 edited

I can subscribe to User ChangeNotifications, but never receive notifications. Is this supported or am I doing something wrong?

Hello,

I can follow the guide (linked below) to set up change notifications with Azure AD and everything works great. When I change my configuration to subscribe to B2C, however, things are not so great. I can create a subscription via the graph API against my B2C instance, but I never receive any notifications.

I followed this guide.
https://docs.microsoft.com/en-us/graph/webhooks

Specifically, the resource I'm subscribing to is /Users

I notice this guide was posted pretty recently, so I have to wonder if this is supported yet on B2C as I'm aware B2C is not at feature parity with AD. I've been googling around and can't find any explicit reference to support for subscriptions and change notifications in B2C. I just wondered if maybe I was doing something wrong, because I found it curious that I was able to create the subscription.

Thanks!

azure-ad-b2cmicrosoft-graph-change-notifications
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

GeorgeJuma-4897 avatar image
0 Votes"
GeorgeJuma-4897 answered BrianEngen-7864 edited

@BrianEngen-7864

I'd love to help. Could you please expound further what the B2C scenario is. If possible kindly share your subscription payload too.

Thanks

· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Can you confirm if subscriptions are supported in B2C or not? I will post some of my use cases below as I exceeded the 1000 char per post limit

as for my subscription payload, I just used the graph api sdk as such:

 var subscription = await Graph
     .Subscriptions
     .Request()
     .AddAsync(new Subscription
     {
         ChangeType = "updated,deleted",
         NotificationUrl = "https://48d766c27a8b.ngrok.io/notification",
         Resource = "/users",
         ExpirationDateTime = DateTimeOffset.UtcNow.AddHours(1),
         ClientState = $"{Constants.ClientState:N}"
     }, stoppingToken);



This worked fine with Azure AD and I received notifications as expected. When connected to B2C, the subscription was created successfully and the handshake completed as expected, but I never received any notifications.

0 Votes 0 ·

A major use case is search. We have requirements to execute a contains search on email, givenName, surname, and displayName. However, I've found that if I $filter on email (actually identities/issuerAssignedId) I can't filter on anything else. Graph API returns an error indicating other properties can't be filtered when identities is included in the filter. As a result, we've been considering maintaining our own search index to better meet our needs.

0 Votes 0 ·

another is audit. We have requirements to audit updates to users for later retrieval. customers in my system have regulatory needs to produce regular audit reports, which include changes to users (among other things) in addition to the user that made the change. This is currently facilitated by various components of the product publishing events which are recorded and formatted by a microservice for later retrieval/export. I have looked into what capabilities B2C has for this, but nothing appears to meet my needs. If I could receive user update events from B2C, I could adapt those into my current audit system.

0 Votes 0 ·
Show more comments