:doc:`WorkMail <../../workmail>` / Client / update_user

***********
update_user
***********



.. py:method:: WorkMail.Client.update_user(**kwargs)

  

  Updates data for the user. To have the latest information, it must be preceded by a  DescribeUser call. The dataset in the request should be the one expected when performing another ``DescribeUser`` call.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdateUser>`_  


  **Request Syntax**
  ::

    response = client.update_user(
        OrganizationId='string',
        UserId='string',
        Role='USER'|'RESOURCE'|'SYSTEM_USER'|'REMOTE_USER',
        DisplayName='string',
        FirstName='string',
        LastName='string',
        HiddenFromGlobalAddressList=True|False,
        Initials='string',
        Telephone='string',
        Street='string',
        JobTitle='string',
        City='string',
        Company='string',
        ZipCode='string',
        Department='string',
        Country='string',
        Office='string',
        IdentityProviderUserId='string'
    )
    
  :type OrganizationId: string
  :param OrganizationId: **[REQUIRED]** 

    The identifier for the organization under which the user exists.

    

  
  :type UserId: string
  :param UserId: **[REQUIRED]** 

    The identifier for the user to be updated.

     

    The identifier can be the *UserId*, *Username*, or *email*. The following identity formats are available:

     

    
    * User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234
     
    * Email address: user@domain.tld
     
    * User name: user
    

    

  
  :type Role: string
  :param Role: 

    Updates the user role.

     

    You cannot pass *SYSTEM_USER* or *RESOURCE*.

    

  
  :type DisplayName: string
  :param DisplayName: 

    Updates the display name of the user.

    

  
  :type FirstName: string
  :param FirstName: 

    Updates the user's first name.

    

  
  :type LastName: string
  :param LastName: 

    Updates the user's last name.

    

  
  :type HiddenFromGlobalAddressList: boolean
  :param HiddenFromGlobalAddressList: 

    If enabled, the user is hidden from the global address list.

    

  
  :type Initials: string
  :param Initials: 

    Updates the user's initials.

    

  
  :type Telephone: string
  :param Telephone: 

    Updates the user's contact details.

    

  
  :type Street: string
  :param Street: 

    Updates the user's street address.

    

  
  :type JobTitle: string
  :param JobTitle: 

    Updates the user's job title.

    

  
  :type City: string
  :param City: 

    Updates the user's city.

    

  
  :type Company: string
  :param Company: 

    Updates the user's company.

    

  
  :type ZipCode: string
  :param ZipCode: 

    Updates the user's zip code.

    

  
  :type Department: string
  :param Department: 

    Updates the user's department.

    

  
  :type Country: string
  :param Country: 

    Updates the user's country.

    

  
  :type Office: string
  :param Office: 

    Updates the user's office.

    

  
  :type IdentityProviderUserId: string
  :param IdentityProviderUserId: 

    User ID from the IAM Identity Center. If this parameter is empty it will be updated automatically when the user logs in for the first time to the mailbox associated with WorkMail.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`WorkMail.Client.exceptions.DirectoryServiceAuthenticationFailedException`

  
  *   :py:class:`WorkMail.Client.exceptions.DirectoryUnavailableException`

  
  *   :py:class:`WorkMail.Client.exceptions.EntityNotFoundException`

  
  *   :py:class:`WorkMail.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`WorkMail.Client.exceptions.OrganizationNotFoundException`

  
  *   :py:class:`WorkMail.Client.exceptions.OrganizationStateException`

  
  *   :py:class:`WorkMail.Client.exceptions.UnsupportedOperationException`

  
  *   :py:class:`WorkMail.Client.exceptions.EntityStateException`

  