Pre-create Users when using LDAP

  1. Deleting team is available via API also, given a team admin role - https://api.mattermost.com/#tag/teams%2Fpaths%2F~1teams~1{team_id}%2Fdelete
  2. Since you’re going to use your LDAP for authentication, you don’t need to create users but have them sync with Mattermost. See this docs to setup LDAP with Mattermost - https://docs.mattermost.com/deployment/sso-ldap.html. Passwords for LDAP users are not stored in Mattermost database; those were at your LDAP server.
  3. Once all users are in sync, you may use Go API to manage their teams.