This study deals with the nonlinear dynamics arising in an atomic force microscope cantilever beam. After analyzing the static behavior, a single degree of freedom Galerkin reduced order model is introduced, which describes the overall scenario of the structure response in a neighborhood of the primary resonance. Extensive numerical simulations are performed when both the forcing amplitude and frequency are varied, ranging from low up to elevated excitations. The coexistence of competing attractors with different characteristics is analyzed. Both the non-resonant and the resonant behavior are observed, as well as ranges of inevitable escape. Versatility of behavior is highlighted, which may be attractive in applications. Special attention is devoted to the effects of the tip-sample separation distance, since this aspect is of fundamental importance to understand the operation of an AFM. We explore the metamorphoses of the multistability region when the tip-sample separation distance is varied. To have a complete description of the AFM response, comprehensive behavior charts are introduced to detect the theoretical boundaries of appearance and disappearance of the main attractors. Also, extensive numerical simulations investigate the AFM response when both the forcing amplitude and the tip-sample separation distance are considered as control parameters. The main features are analyzed in detail and the obtained results are interpreted in terms of oscillations of the cantilever-tip ensemble. However, we note that all the aforementioned results represent the limit when disturbances are absent, which never occurs in practice. Here comes the importance of overcoming local investigations and exploring dynamics from a global perspective, by introducing dynamical integrity concepts. To extend the AFM results to the practical case where disturbances exist, we develop a dynamical integrity analysis. After performing a systematic basin of attraction analysis, integrity profiles and integrity charts are drawn. The curves of constant percentage of integrity measure are detected, highlighting that they provide valuable quantitative information about the changes in the structural safety. Robustness as well as vulnerability to disturbances is examined. The practical range of existence of each branch is observed to be smaller, and sometimes remarkably smaller than the theoretical one. The issue of the dynamical integrity analysis in the AFM design is addressed, showing that these curves may be used to establish safety factors in order to operate the AFM according to the desired outcome, depending on the expected disturbances. Physical meaning and practical relevance of the nonlinear phenomena in the AFM engineering design are discussed.