Provided is an
epoxy resin composition which, when used as an
adhesive for bonding members to each other, is capable of suppressing positional displacement between the members and suppressing thermal degradation of the members. The
epoxy resin composition contains an
epoxy resin, a polythiol, a photobase generator, and a sensitizer, and also contains one or more epoxy resins, at least one of the epoxy resins has two or more epoxy groups in one molecule, the polythiol contains an
ester bond and has five or more mercapto groups, and the photobase generator contains a photobase. Alternatively, the polythiol contains a
nitrogen atom and the mercapto group is bonded to the
nitrogen atom via the alkylene group.