Give each group its licence. Entra then licenses every member and keeps doing so as membership changes.
PowerShell
$facultySku = "PASTE-A5-FACULTY-SKUID"
$studentSku = "PASTE-A5-STUDENT-SKUID"
Set-MgGroupLicense -GroupId $students.Id -AddLicenses @(@{ SkuId = $studentSku }) -RemoveLicenses @()
Set-MgGroupLicense -GroupId $staff.Id -AddLicenses @(@{ SkuId = $facultySku }) -RemoveLicenses @()Prefer the admin centre?
Whereentra.microsoft.com›Groups›your group›Licenses›Assignments
Tick the licence and select Save. Leave every service plan switched on unless you have a reason to turn one off.


