A cloud-based identity and access management service for securing user authentication and resource access
There are several different ways that you can achieve this, the best fit for your scenario probably is via directory extensions: https://learn.microsoft.com/en-us/graph/extensibility-overview?tabs=http#directory-microsoft-entra-id-extensions
The other methods are also detailed in the above article, go over them.