The increasing frequency and severity of weather extremes caused by climate change evidence the need to assess buildings beyond their typical thermal and energy performance under normal operation. It is also essential to evaluate thermal resilience to safeguard occupants' health during extreme events and power outages. This study proposes a simulation framework to evaluate and enhance the thermal resilience of buildings against indoor overheating using an integrated set of performance metrics. This work also addresses how to aggregate resilience profiles of single buildings into the urban scale, supporting the evaluation of thermally resilient communities. This is the first step to connecting building and urban scales in a resilience analysis, seeking to further address other stakeholders' needs in the future. The application of the framework is exemplified through a case study considering three different climates in Brazil. This analysis allowed identifying cases with poor thermal resilience and essential dependence on air conditioning to guarantee the survivability of occupants during extreme hot weather. Nonetheless, by only changing the envelope's thermal transmittance and thermal mass, buildings' thermal autonomy increased up to 65% points and cooling loads were reduced by up to 61% in the hottest climate, São Luís. However, additional strategies are necessary to mitigate remaining indoor extreme thermal conditions, such as solar shading and increased air movement.