An invariant random subgroup (IRS) of a group G is a conjugation-invariant Borel measure on the set of subgroups of G. A character on G is a positive-definite complex-valued function constant on conjugacy classes of G. In this talk I will discuss IRS's, characters and the relation between them for two classes of groups: approximately finite groups (acting on Bratteli diagrams) and weakly branch groups (acting on rooted trees). The talk is based on joint papers with Konstantin Medynets and an ongoing joint work with Rostislav Grigorchuk.