Hi, As far as I know, as of now, Microsoft does not provide APIs to Update Users from Microsoft 365 directly.
More details:
https://yzhums.com/22845/
If you want to customize it, I guess it won't work. I simply looked into it, the final execution of codeunit 9017, "Azure AD User Mgmt. Impl.", does not allow external extension calls.

page 9515 "Azure AD User Update Wizard"


Hope this will help.
Thanks.
ZHU