Use sp_role to grant replication role to the maintenance user.
sp_role "grant", replication_role, maintenance_user