You can utilize the Microsoft Graph API for this, but in order to make modifications on behalf of other users, you'll need the necessary rights.