Disabled/Blocked Users not getting added as member to teams using graph api

Legion Squad 1 Reputation point
2022-11-17T09:28:44.923+00:00

Disabled/Blocked Users not getting added as member to teams using this graph api https://learn.microsoft.com/en-us/graph/api/team-post-members?view=graph-rest-1.0&tabs=http and getting error message

innerError":{"message":"User 'd7bc3af8-e652-4969-b917-c15a27b8e499' does not exist.","code":"ItemNotFound","innerError":{},"date":"2022-11-09T09:54:58","request-id":"cecea30e-e5e8-44ee-b0f8-57977169e9bd","client-request-id":"cecea30e-e5e8-44ee-b0f8-57977169e9bd"}

So wanted to know is this something not allowed by Azure only and any specific reason for the same. Or is there any alternative to resolve this.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,569 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,455 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 95,181 Reputation points MVP
    2022-11-17T09:40:56.507+00:00

    That's by design, disabled users cannot use Teams and are automatically removed from any team they're a member of. The behavior is detailed for example here: https://learn.microsoft.com/en-us/microsoftteams/troubleshoot/channels/logon-reenabled-user-not-see-previous-joined-teams
    It's a poor design, I know, but try convincing Microsoft of the same...

    0 comments No comments