{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"**This endpoint allows you to modify an existing SSO Teammate.**\n\nOnly the parent user and Teammates with admin permissions can update another Teammate's permissions.\n\n### Scopes\n\nWhen updating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`.\n\nYou can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate.\n\n### Subuser access\n\nSendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information.\n\nWhen assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property.","properties":{"path":{"type":"object","properties":{"username":{"type":"string","format":"email","description":"Set this parameter to the Teammate's email address. This address must be the same address assigned to the Teammate in your IdP."}},"required":["username"],"additionalProperties":false},"body":{"$ref":"#/definitions/PatchSsoTeammatesRequest","examples":[{"first_name":"Jane","last_name":"Doe","has_restricted_subuser_access":true,"subuser_access":[{"id":12345,"permission_type":"admin"}]}]}},"required":["path"],"additionalProperties":false,"definitions":{"PatchSsoTeammatesRequest":{"allOf":[{"$ref":"#/definitions/SsoTeammatesBaseRequestProps"},{"title":"Single Sign-On Teammate Update Request Body"}]},"SsoTeammatesBaseRequestProps":{"type":"object","properties":{"first_name":{"type":"string","description":"Set this property to the Teammate's first name."},"last_name":{"type":"string","description":"Set this property to the Teammate's last name."},"is_admin":{"type":"boolean","description":"Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes."},"persona":{"allOf":[{"$ref":"#/definitions/Persona"},{"type":"string"}]},"scopes":{"type":"array","description":"Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate.","items":{"type":"string"}},"has_restricted_subuser_access":{"type":"boolean","description":"Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access."},"subuser_access":{"type":"array","description":"Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`.","items":{"type":"object","description":"An array of Subusers to which the Teammate should have access.","properties":{"id":{"type":"integer","description":"Set this property to the ID of a Subuser to which the Teammate should have access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/)."},"permission_type":{"allOf":[{"$ref":"#/definitions/PermissionType"},{"type":"string"}]},"scopes":{"type":"array","description":"Add or remove permissions that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this property in the request when the `permission_type` property is set to `admin`—administrators have full access to the specified Subuser.","items":{"type":"string"}}},"required":["id","permission_type"]}}},"required":["first_name","last_name"]},"Persona":{"type":"string","enum":["accountant","developer","marketer","observer"]},"PermissionType":{"type":"string","enum":["admin","restricted"]}}},"name":"Edit an SSO Teammate","id":"sendgrid.sso.updatessoteammate","example":{"path":{"username":"developer@example.com"}},"maxRequests":1,"summary":false}}