@Nithin Krishnamurthy In addition to my above comment.
Azure B2C does not work with managed identity. It is not in the road map from the Product Group, but you can raise that as a feature request in our feedback channel for the product team to prioritize that in the future.
Please let me know if you have any further query. Will be more than happy to help
Regards,
Oury