Qué vas a conseguir
Que cada persona tenga la licencia que necesita su puesto, que llegue sola al darla de alta y que vuelva al bolsillo cuando se va. En una cadena con cientos de dependientes, rotación alta y campañas con personal temporal, asignar licencias a mano persona a persona acaba en dos problemas: gente sin correo el primer día y licencias pagadas de quien se fue hace meses.
Antes de empezar
- Las suscripciones contratadas y cuántas hay de cada una (Centro de administración de Microsoft 365 › Facturación › Licencias).
- Saber si el contrato es con Teams incluido o con suites sin Teams más Teams Enterprise aparte: cambia qué hay que asignar para que el usuario tenga Teams.
- El origen de los usuarios: Entra ID directo o sincronizados desde Active Directory, y qué atributos llegan rellenos (departamento, país, tipo de empleado).
- El rol Administrador de licencias para el service desk: puede asignar licencias y cambiar la ubicación de uso sin ser administrador de usuarios ni global.
1. Qué licencia lleva cada perfil
| Perfil | Licencia | Qué tiene | Qué no tiene |
|---|---|---|---|
| Dependiente de tienda | Microsoft 365 F3 | Buzón de 2 GB en Outlook web y móvil, Teams, apps web y móviles, OneDrive de 2 GB | Outlook y Office de escritorio, archivo |
| Encargado de tienda | F3, o E3 si gestiona correo y Excel a diario | Según la licencia | |
| Oficina central | Microsoft 365 E3 | Office de escritorio, buzón de 100 GB, archivo | |
| Equipo compartido de trastienda | Ninguna personal: se inicia sesión con la cuenta de cada uno |
La decisión de quién es "de tienda" y quién "de oficina" la toma el negocio, no IT. Lo que hace IT es traducirla en grupos y en un criterio que se pueda auditar.
2. Licencias por grupo en Entra ID
Un grupo por licencia, y la membresía la decide un atributo:
LIC-M365-F3-Tiendas: grupo dinámico con la regla(user.department -eq "Tiendas") and (user.accountEnabled -eq true).LIC-M365-E3-Oficina: grupo dinámico por departamento de la central, o asignado si el criterio no es limpio.LIC-M365-E3-Excepciones: grupo asignado para los casos aprobados fuera de la regla, con propietario y revisión.
- Los planes de servicio se activan o desactivan en el grupo, no usuario a usuario. Si se desactiva Teams en el grupo, ningún dependiente tendrá Teams.
- Un usuario no debe tener la misma licencia directa y por grupo: es más difícil de auditar y, al quitarle el grupo, la directa se queda.
- Los grupos dinámicos necesitan Entra ID P1, que incluyen tanto F3 como E3.
3. El flujo con el service desk
- Petición: RR. HH. da de alta a la persona con su departamento y su tienda. Si el atributo está bien, la licencia llega sola. Solo se pide por ticket lo que se sale de la regla (un encargado con E3, un temporal con un plan extra).
- Aprobación: las excepciones las aprueba el responsable del área en el ticket, no un correo al técnico.
- Asignación: el service desk añade al usuario al grupo de excepciones. Nunca licencia directa.
- Recuperación en las bajas: al desactivar la cuenta, el usuario sale de los grupos dinámicos y la licencia vuelve a estar disponible. Si el buzón tiene que conservarse (un encargado, una tienda), se convierte en buzón compartido antes de quitar la licencia.
Antes de quitar la licencia a alguien que se va, comprueba si tiene retención o si su responsable necesita el correo. Al quitarla, Exchange da un periodo de gracia y después el buzón se elimina.
4. La conciliación mensual
Connect-MgGraph -Scopes Organization.Read.All, User.Read.All, AuditLog.Read.AllGet-MgSubscribedSku | Select-Object SkuPartNumber, ConsumedUnits, @{n='Compradas';e={$_.PrepaidUnits.Enabled}}SkuPartNumber ConsumedUnits Compradas------------- ------------- ---------SPE_F1 812 850SPE_E3 236 240$limite = (Get-Date).AddDays(-45)Get-MgUser -All -Filter 'accountEnabled eq true' -Property DisplayName,Department,SignInActivity,AssignedLicenses | Where-Object { $_.AssignedLicenses -and $_.SignInActivity.LastSuccessfulSignInDateTime -lt $limite } | Select-Object DisplayName, Department, @{n='UltimoInicio';e={$_.SignInActivity.LastSuccessfulSignInDateTime}}DisplayName Department UltimoInicio----------- ---------- ------------Marta Ruiz Tiendas 02/08/2026 9:14:03Sergio Lázaro Compras 21/07/2026 17:40:51(SPE_F1 es el identificador interno de Microsoft 365 F3, SPE_E3 el de Microsoft 365 E3.)
- Cuentas activas sin inicio de sesión en 45 días: en tienda suelen ser bajas que RR. HH. no ha comunicado o temporales de campaña. Se pregunta a RR. HH., no se desactivan por tu cuenta.
- Licencias directas que no deberían existir: se pasan al grupo que corresponde o se quitan.
- Margen de cada producto antes de campañas: si en noviembre entran 120 temporales, las F3 tienen que estar compradas antes.
5. El ticket: "el usuario no tiene Outlook ni Teams tras asignarle la licencia"
Javier Ruiz empieza hoy en la tienda T045, en plena incorporación de temporales de campaña. Está en el grupo de F3 desde ayer, pero Outlook web dice que no tiene buzón y Teams no le deja entrar.
- ¿Le ha llegado la licencia? En el usuario, Licencias: puede aparecer la licencia con estado de error en lugar de activa.
- El estado de la asignación:
$u = Get-MgUser -Filter "mailNickname eq 'javier.ruiz'" -Property Id,DisplayName,UsageLocation,LicenseAssignmentStates$u.UsageLocationES$u.LicenseAssignmentStates | Select-Object SkuId, State, ErrorSkuId State Error----- ----- -----66b55226-6b4f-492c-910c-a3b7a3c9d993 Error CountViolationNo quedan F3 libres: las altas de campaña han consumido todas. El grupo no puede asignarle la licencia y el error se queda en el usuario, sin aviso a nadie.
- La solución: se liberan licencias de las bajas que salieron en la conciliación (o se compran más) y se reprocesa al usuario.
# Tras liberar licencias de bajas ya desactivadasInvoke-MgLicenseUser -UserId $u.Id(Get-MgUserLicenseDetail -UserId $u.Id).ServicePlans | Where-Object ServicePlanName -in 'EXCHANGE_S_DESKLESS','TEAMS1' | Select-Object ServicePlanName, ProvisioningStatusServicePlanName ProvisioningStatus--------------- ------------------EXCHANGE_S_DESKLESS SuccessTEAMS1 PendingProvisioning- La propagación: con la licencia ya en
Success, el buzón puede tardar un rato en crearse y Teams algo más. Se le pide que cierre sesión y vuelva a entrar pasado ese tiempo, no que reinstale nada.
Si había licencias, las otras causas habituales:
- Plan desactivado en el grupo: Teams o Exchange en
Disabled. Se corrige en el grupo, para todos. - Ubicación de uso vacía o equivocada: en asignación directa no deja asignar; por grupo se usa la del tenant, que puede no ser el país del usuario. Se corrige en el usuario o en el origen.
- Planes en conflicto (
MutuallyExclusiveViolation): tiene F3 por grupo y una E3 directa antigua. Se quita la directa. - Suite sin Teams: el usuario de oficina tiene E3 (no Teams) y le falta la licencia de Teams Enterprise.
- Sincronizado desde AD sin el departamento correcto: no entra en el grupo dinámico. Se corrige en AD, no en Entra ID.
Siguientes pasos
- La guía de Microsoft 365 y licencias del Nivel 1 explica los productos y los planes de servicio.
- La guía de Microsoft Graph cubre la conexión y los permisos para automatizar estos informes.
- La guía de Azure AD Connect ayuda cuando el atributo que decide la licencia viene de Active Directory.
- La guía de Outlook y Exchange Online sigue donde termina esta: el buzón ya existe y algo no funciona.
¿Falta algo o en tu entorno es distinto? Escríbeme y lo corrijo.
What you'll get
Everyone having the licence their job needs, getting it automatically when they join and handing it back when they leave. In a chain with hundreds of sales assistants, high turnover and seasonal staff, assigning licences by hand person by person ends in two problems: people with no email on day one and licences paid for people who left months ago.
Before you start
- The subscriptions purchased and how many of each (Microsoft 365 admin center › Billing › Licenses).
- Whether the contract includes Teams or uses suites with no Teams plus Teams Enterprise separately: it changes what you must assign for the user to get Teams.
- Where users come from: Entra ID directly or synchronised from Active Directory, and which attributes arrive populated (department, country, employee type).
- The License Administrator role for the service desk: it can assign licences and change usage location without being a user or global administrator.
1. Which licence each role gets
| Role | Licence | What it has | What it lacks |
|---|---|---|---|
| Store sales assistant | Microsoft 365 F3 | 2 GB mailbox in Outlook on the web and mobile, Teams, web and mobile apps, 2 GB OneDrive | Desktop Outlook and Office, archive |
| Store manager | F3, or E3 if they handle email and Excel daily | Depends on the licence | |
| Head office | Microsoft 365 E3 | Desktop Office, 100 GB mailbox, archive | |
| Shared back-room computer | No personal licence: each person signs in with their own account |
The decision on who is "store" and who is "office" is made by the business, not IT. What IT does is turn it into groups and a rule that can be audited.
2. Group-based licensing in Entra ID
One group per licence, with membership decided by an attribute:
LIC-M365-F3-Stores: dynamic group with the rule(user.department -eq "Stores") and (user.accountEnabled -eq true).LIC-M365-E3-Office: dynamic group by head-office department, or assigned if the rule isn't clean.LIC-M365-E3-Exceptions: assigned group for approved cases outside the rule, with an owner and a review.
- Service plans are switched on or off on the group, not user by user. If Teams is disabled on the group, no sales assistant will have Teams.
- A user shouldn't have the same licence both directly and by group: it's harder to audit and, when the group is removed, the direct one stays.
- Dynamic groups need Entra ID P1, included in both F3 and E3.
3. The service desk flow
- Request: HR creates the person with their department and store. If the attribute is right, the licence arrives by itself. Only what falls outside the rule is requested by ticket (a manager with E3, a temp with an extra plan).
- Approval: exceptions are approved by the area manager in the ticket, not by an email to the technician.
- Assignment: the service desk adds the user to the exceptions group. Never a direct licence.
- Reclaim for leavers: when the account is disabled, the user drops out of the dynamic groups and the licence becomes available again. If the mailbox must be kept (a manager, a store), it is converted to a shared mailbox before the licence is removed.
Before removing the licence of someone who is leaving, check whether they are on hold or their manager needs the mailbox. Once removed, Exchange gives a grace period and then the mailbox is deleted.
4. The monthly reconciliation
Connect-MgGraph -Scopes Organization.Read.All, User.Read.All, AuditLog.Read.AllGet-MgSubscribedSku | Select-Object SkuPartNumber, ConsumedUnits, @{n='Purchased';e={$_.PrepaidUnits.Enabled}}SkuPartNumber ConsumedUnits Purchased------------- ------------- ---------SPE_F1 812 850SPE_E3 236 240$limit = (Get-Date).AddDays(-45)Get-MgUser -All -Filter 'accountEnabled eq true' -Property DisplayName,Department,SignInActivity,AssignedLicenses | Where-Object { $_.AssignedLicenses -and $_.SignInActivity.LastSuccessfulSignInDateTime -lt $limit } | Select-Object DisplayName, Department, @{n='LastSignIn';e={$_.SignInActivity.LastSuccessfulSignInDateTime}}DisplayName Department LastSignIn----------- ---------- ----------Marta Ruiz Stores 02/08/2026 09:14:03Sergio Lazaro Purchasing 21/07/2026 17:40:51(SPE_F1 is the internal identifier for Microsoft 365 F3, SPE_E3 for Microsoft 365 E3.)
- Active accounts with no sign-in in 45 days: in stores these are usually leavers HR hasn't reported, or seasonal temps. Ask HR; don't disable them on your own.
- Direct licences that shouldn't exist: move them to the right group or remove them.
- Headroom for each product before campaigns: if 120 temps join in November, the F3s must be bought before then.
5. The ticket: "the user has no Outlook or Teams after the licence was assigned"
Javier Ruiz starts today at store T045, in the middle of the seasonal hiring. He has been in the F3 group since yesterday, but Outlook on the web says he has no mailbox and Teams won't let him in.
- Has the licence arrived? On the user, Licenses: the licence may show an error state instead of active.
- The assignment state:
$u = Get-MgUser -Filter "mailNickname eq 'javier.ruiz'" -Property Id,DisplayName,UsageLocation,LicenseAssignmentStates$u.UsageLocationES$u.LicenseAssignmentStates | Select-Object SkuId, State, ErrorSkuId State Error----- ----- -----66b55226-6b4f-492c-910c-a3b7a3c9d993 Error CountViolationNo F3 left: the seasonal joiners have used them all. The group can't assign him the licence and the error stays on the user, with no alert to anyone.
- The fix: free licences from the leavers found in the reconciliation (or buy more) and reprocess the user.
# After freeing licences from disabled leaversInvoke-MgLicenseUser -UserId $u.Id(Get-MgUserLicenseDetail -UserId $u.Id).ServicePlans | Where-Object ServicePlanName -in 'EXCHANGE_S_DESKLESS','TEAMS1' | Select-Object ServicePlanName, ProvisioningStatusServicePlanName ProvisioningStatus--------------- ------------------EXCHANGE_S_DESKLESS SuccessTEAMS1 PendingProvisioning- Propagation: with the licence at
Success, the mailbox can take a while to be created and Teams a bit longer. Ask him to sign out and back in after that time, not to reinstall anything.
If there were licences, the other usual causes:
- Plan disabled on the group: Teams or Exchange at
Disabled. Fix it on the group, for everyone. - Usage location empty or wrong: direct assignment refuses it; by group the tenant's is used, which may not be the user's country. Fix it on the user or at the source.
- Conflicting plans (
MutuallyExclusiveViolation): F3 by group and an old direct E3. Remove the direct one. - Suite with no Teams: the office user has E3 (no Teams) and is missing the Teams Enterprise licence.
- Synchronised from AD without the right department: not in the dynamic group. Fix it in AD, not in Entra ID.
Next steps
- The Level 1 Microsoft 365 y licencias (Microsoft 365 and licences) guide explains the products and service plans.
- The Microsoft Graph guide covers connecting and the permissions needed to automate these reports.
- The Azure AD Connect guide helps when the attribute that decides the licence comes from Active Directory.
- The Outlook y Exchange Online guide picks up where this one ends: the mailbox exists and something doesn't work.
Is something missing, or different in your environment? Get in touch and I'll fix it.
Tech Career Lab · newsletter
¿Te ha servido? Cada dos semanas envío una idea práctica para perfiles IT: LinkedIn, proyectos, networking y procesos de selección.Found this useful? Every two weeks I send one practical idea for IT professionals: LinkedIn, projects, networking and hiring processes.
Apúntate y llévate las 33 ideasSign up and get the 33 ideas →