To gain allegiance, you must have at least gained knowledge of at least 4 spells.