I would like to delete a member of a team. For that I need to get the membership-id of a user.
The api call for that is https://graph.microsoft.com/v1.0/teams/{{teams-id}}/members
Sometimes the response of this call gets me a diferrent membership-id for the same user.
Short version(anonymized): 'id': 'ZmZhYTc5XXXtYWVmNi0XXXX1LThkNzQtXXXXYTRhMTgzYTkyIyMwMTdhNzXXXX02NWQ4LTQ0NTgtYTXXXXX4ZDU3N2FlNmYXXXXX'
Long version(anonymized): 'id': 'MCMjMSMjMWU3OWMXXXXtMDEyMS00XXX4LTk2ZDctZWI1MTY4MDYyNWVkIyNXXXFhNzk2Mi1hZWY2LTRmXXXtOGQ3NC0yOXXXXGExODNhOTIjIzAxN2E3NGUxLTY1ZDgtNDQ1OC1hMWU4XXXXXTc3YWU2ZjczNA=='
If I try to delete a member with one of the ids, it is possible that I get an error message.
"message":"You do not have access to this resource.",
Permissions are set and the error occurs only sometimes.
Has anyone an idea?