In this paper we address the problem of defining social roles in multi-agent systems. Social roles provide the basic structure of social institutions and organizations. We start from the properties attributed to roles both in the multi-agent systems and the Object Oriented community, and we use them in an ontological analysis of the notion of social role. We identify three main properties of social roles. First, they are definitionally dependent on the institution they belong to, i.e. the definition of a role is given inside the definition of the institution. Second, they attribute powers to the agents playing them, like creating commitments for the institutions and the other roles. Third, they allow roles to play roles, in the same way as agents do. Using Input/Output logics, we propose a formalization of roles in multi-agent systems satisfying the three properties we identified.