Returns a unit's primary faction allegiance


See also Unit functions, Faction functions.

Signature:

factionGroup, factionName = UnitFactionGroup("unit") or UnitFactionGroup("name")

Arguments:

  • unit - A unit to query (string, unitID)
  • name - The name of a unit to query; only valid for player, pet, and party/raid members (string)

Returns:

  • factionGroup - Non-localized (English) faction name of the faction ('Horde', 'Alliance', or 'Neutral') (string)
  • factionName - Localized name of the faction (string)