code: public static String getCurrentTenantName() {
          Profile profile = SecurityUtils.getCurrentProfile();
          if (profile != null) {
              return profile.getTenant();
          } else {
              return null;
          }
      }
docs: Returns the current tenant name, which is the tenant of the currently authenticated profile.
  
  @return the current tenant name.