Modified method get_orgs_by_scope_id