@Kristine Myrland Joa
Thank you for your post!
Based off your issue, you should be able to get alerts Using the Microsoft Graph API to get change notifications for changes in user data. I also found a Stack Overflow post that utilizes Azure functions, which might help point you in the right direction - For more info: Notifications for changes in user data in Azure AD.
Additional Links:
Set up notifications for changes in user data
Tutorial: Use Change Notifications and Track Changes with Microsoft Graph
If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.
----------
Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.