Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Hide the logout button on the custom portal

You can hide the logout option for your custom portal that appears in the Employee Center tab within Microsoft Teams.

Before you begin

Role required: admin

Procedure

  1. Navigate to All > Service Portal > CSS.

  2. Click on your custom CSS.

  3. Click here to edit the CSS.

Image omitted: edit-css-2.png
Edit CSS
  1. To disable the logout button from Microsoft Teams desktop application.

    Customize the following code as required and paste in the CSS.

    /* Embedded portal */
    
    /*The code shared to disable the logout button is an example. You need to customize as required to disable logout button.*/
    
    .embedded-experience .avatar-drop-down .header-menu-item:last-child {
            display: none;
          }
    
  2. To disable the logout button from Microsoft Teams mobile application.

    Customize the following code as required and paste in the CSS.

    /* Embedded portal */
    
    /*The code shared to disable logout button is an example. You need to customize as required to disable logout button.*/
    
    .embedded-experience .impersonate-and-logout {
              div > ul > li:last-child {
                display: none !important;
             }
          }
    
  3. Click Update.

  4. Refresh the custom portal tab in Microsoft Teams.

Parent Topic:Embed a custom portal