Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Lesson 2 of 47
❮Prev Next❯

Licenses and External Users in Microsoft Entra ID

Module 1: Identity & Governance ⏱ 11 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    30-second answer

    A license turns on paid features for a user, such as Microsoft 365 E3 or Microsoft Entra ID P1/P2. You can assign it directly to a user, which needs the user's usage location first, or to a group (group-based licensing, needs Entra ID P1), so members gain and lose it as they join and leave. External users from other organisations join as guests through B2B collaboration: they sign in with their own account, appear with user type Guest and an #EXT# UPN, and what they can do is set in External collaboration settings and cross-tenant access settings.

    Simulate it » No Azure account needed

    Exam objective: 1.1.3 Manage licenses in Microsoft Entra ID. 1.1.4 Manage external users. (Skills measured as of April 17, 2026)

    Simulations

    Feel it before you read it. No account needed, nothing leaves this page.

    Azure portal: Group-based licensing and inviting a guest user License a group and invite a partner as a guest.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    In <strong>Microsoft Entra ID → Groups</strong>, open <strong>Sales-Team</strong>. Licensing a group beats licensing 18 people one by one.

    👆 Click the glowing item in the portal to continue

    Read the steps as text
    1. In Microsoft Entra ID → Groups, open Sales-Team. Licensing a group beats licensing 18 people one by one.
    2. Open Licenses and select + Assignments. Group-based licensing needs Microsoft Entra ID P1 (or a plan that includes it, such as Microsoft 365 E3).
    3. Pick the product and turn off any service plans the team doesn't need. Then Save.
    4. Done. Members without a usage location get the directory's location. A direct assignment, by contrast, fails until the user has one.
    5. Now a partner. In Users, select + New user → Invite external user.
    6. Priya keeps her own Fabrikam account and password. You manage what she can reach, not her credentials.
    7. Priya shows up as a Guest with #EXT# in her UPN. CLI has no invite command; use the portal or New-MgInvitation in Microsoft Graph PowerShell.
    8. External collaboration settings decide who may invite guests, what guests can see, and which domains are allowed.

    🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.

    😟 THE PROBLEM

    People leave the sales team and still hold a Microsoft 365 license.

    😊 THE SOLUTION

    License the group, not the person, and invite partners as guests.

    • Unused paid licenses✓ Group-based licensing
    • Direct assignment fails✓ Set usage location first
    • Partner accounts to manage✓ Guests use their own sign-in
    🛠️ Solved with: Group-based licensing and B2B

    Start with a question

    How does a gym give members the right pass, and let a visiting friend in for a day?

    A gym hands each member a pass for the classes they’ve paid for. Some companies buy passes for a whole team, so anyone who joins the team gets one and anyone who leaves hands it back. And when you bring a friend, the gym doesn’t make them a new ID card. They show their own driving licence and sign in as a guest.

    In Microsoft Entra ID the pass is a license, the team deal is group-based licensing, and the visiting friend is a B2B guest who signs in with their own company account.

    Explain it like I’m 10

    The technical explanation

    Licenses

    Products such as Microsoft 365 E3, Microsoft Entra ID P1 and P2 are bought as a number of seats. Each license contains service plans (Exchange Online, Teams, Entra ID P1 and so on) that you can switch off when you assign it.

    Direct assignmentGroup-based licensing
    WhereUser → Licenses → + AssignmentsGroup → Licenses → + Assignments
    NeedsUsage location on the userEntra ID P1 (or a plan that includes it)
    LeaversYou remove it by handRemoved when they leave the group
    Missing usage locationAssignment failsThe directory’s location is used
    Not enough seatsAssignment failsMembers show an error state; add seats, then Reprocess

    Pair group licensing with a dynamic group and licenses follow HR data with no clicks at all. If a user gets the same product directly and from a group, they use one seat, and you can remove the direct one safely.

    # Microsoft Graph PowerShell
    Update-MgUser -UserId sam@contoso.com -UsageLocation "IN"
    $e3 = Get-MgSubscribedSku | Where-Object SkuPartNumber -eq "SPE_E3"
    Set-MgUserLicense -UserId sam@contoso.com -AddLicenses @{SkuId = $e3.SkuId} -RemoveLicenses @()

    External users (B2B collaboration)

    Users → + New user → Invite external user sends an invitation. The guest redeems it and signs in with their own Microsoft Entra account, a Microsoft account, Google or a one-time email passcode. In your tenant they appear with User type: Guest, and a UPN like priya_fabrikam.com#EXT#@contoso.onmicrosoft.com. You give them access the same way as anyone else: groups, app assignments, Azure roles.

    External Identities → External collaboration settings controls:

    • Guest user access: same as members, limited (the default), or restricted to their own objects.
    • Guest invite settings: from “anyone, including guests” down to “no one”.
    • Collaboration restrictions: allow any domain, deny listed domains, or allow only listed domains.

    Cross-tenant access settings go further per organisation: block or allow inbound and outbound B2B, and trust the partner’s MFA so guests aren’t asked twice. For customer-facing sign-up apps, Microsoft points you to External ID in an external tenant instead of B2B guests.

    1. 1 Group

      Sales-Team is a dynamic group of everyone in Sales.

    2. 2 License

      Microsoft 365 E3 is assigned to the group, so every member gets a seat.

    3. 3 Invite

      priya@fabrikam.com is invited and redeems with her Fabrikam account.

    4. 4 Access

      Priya joins a project group that has access to one SharePoint site.

    Licensing the sales team and inviting a partner
    Architect level Guests and Azure resources

    Guests can hold Azure roles too. Invite the partner, then assign them, or better a group they’re in, a role at a resource group. By default guests can’t browse your directory freely, which is why the “limited access” setting exists. If a guest needs to see other users in a picker, you either raise their access level or give them a directory role like Directory Readers. Remove guests (or let access reviews remove them) when the work ends; stale guests are a common audit finding.

    Real-world business scenario

    Wholesale

    Northwind Traders (fictional)

    The problem
    Northwind paid for 40 Microsoft 365 E3 licenses still held by people who'd changed roles, and consultants from an agency shared one generic account.
    What they used
    Group-based licensing on dynamic department groups, and B2B guest invitations for each agency consultant, with invitations restricted to the agency's domain and MFA trusted from the agency tenant.
    Why that choice
    Licenses move with the department attribute, and every consultant signs in as themselves, so actions are traceable and access ends when the guest is removed.
    The result
    About $1,400 a month of unused licenses was freed up and the shared account was deleted.

    When to use it and when not to

    ✓ Use it when…

    • Licenses that should follow team membership (group-based licensing).
    • One-off licenses for a specific person, after setting usage location (direct).
    • Partners, contractors and suppliers who already have a work account (B2B guests).

    ✕ Think twice when…

    • Creating member accounts with passwords for external people. Invite them as guests.
    • Group licensing on a group that will exceed your seat count without monitoring errors.

    ↔ Alternatives to consider

    • External ID (external tenant) for customer sign-up and sign-in to your apps.
    • Entitlement management access packages when guests should request access that expires on its own.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    Test yourself with exercises

    5 original practice questions in the AZ-104 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.

    Question 1

    Question 1 of 5

    You create a new user named User1 and attempt to assign a Microsoft 365 E3 license directly. The assignment fails. What should you configure first?

    Question 2

    Question 2 of 5 · Select 2

    Licenses must be assigned automatically to users when they join the Sales department and removed when they leave. User accounts already have the Department attribute populated. Which two actions should you perform? Each correct answer presents part of the solution.

    Question 3

    Question 3 of 5

    Several members of a group that has a license assignment show an error state. The license has no available seats. After you purchase additional seats, what should you do?

    Question 4

    Question 4 of 5

    Consultants from a partner company must access an internal app by using their existing work accounts. You must not manage passwords for them. What should you do?

    Question 5

    Question 5 of 5

    Your company must allow guest invitations only to users in fabrikam.com and litware.com. Which setting should you configure?

    Interview preparation

    Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

    Beginner What's the difference between assigning a license directly and through a group?

    Model answer

    Direct means I pick a user and give them the license. Group-based means I give the license to a group, and everyone in it gets it. When someone leaves the group they lose it, which stops paid licenses sitting with people who don't need them.

    Intermediate A direct license assignment fails. What's the first thing you check?

    Model answer

    The user's usage location. Licenses depend on which country the service is used in, so the portal won't assign one until usage location is set. After that I'd check whether there are any free seats left for that product.

    Experienced developer Some members of a licensed group show an error state. Why?

    Model answer

    Usually not enough seats, so the group can't license everyone, or a conflict between two service plans the user gets from different groups. I'd add seats or remove the conflicting plan, then select Reprocess on the group's Licenses blade. Members without a usage location use the directory's location under group licensing, so that's rarely the cause.

    Scenario A partner's consultants need access to one SharePoint site and an internal app for three months. How would you set it up?

    Model answer

    I'd invite them as B2B guests, ideally into a group that has access to the site and the app, so I'm not managing a password for them. I'd restrict invitations to the partner's domain in External collaboration settings, require MFA through Conditional Access, and put an access review or an expiry on the group so access ends with the project.

    Quick revision

    Key points

    • Direct license assignment needs a usage location on the user.
    • Group-based licensing (Entra ID P1) gives every member the license and removes it when they leave.
    • Not enough seats puts members in an error state; add seats, then Reprocess.
    • Guests sign in with their own account. User type Guest, UPN contains #EXT#.
    • External collaboration settings control guest access level, who can invite and allowed domains.

    Important terminology

    Usage location
    The two-letter country where a user mainly uses Microsoft services. Required before you assign a license directly.
    Group-based licensing
    Assigning licenses to a group so every member inherits them. Needs Microsoft Entra ID P1 or a plan that includes it.
    Service plan
    One service inside a license, such as Exchange Online or Teams, which you can switch off per assignment.
    B2B collaboration
    Inviting people from other organisations as guests who sign in with their own identity.
    Guest user
    A user object with user type Guest that represents an external person in your tenant.
    External collaboration settings
    Tenant settings for who can invite guests, what guests can see, and which domains are allowed.
    Cross-tenant access settings
    Inbound and outbound rules per partner organisation, including trusting their MFA and device claims.

    Common mistakes

    • Thinking a guest needs a password created in your tenant. They use their home identity.
    • Assigning licenses user by user when a group would keep them correct automatically.

    Exam tips

    • "License assignment fails for a new user" = set the usage location.
    • "Licenses should follow department membership" = group-based licensing on a dynamic group.
    • "Only allow guests from fabrikam.com" = Collaboration restrictions in External collaboration settings.

    Five quick revision questions

    1. 1.What must be set before you assign a license directly?Show

      The user's usage location.

    2. 2.Which license does group-based licensing need?Show

      Microsoft Entra ID P1 (or a plan that includes it).

    3. 3.How can you spot a guest's UPN?Show

      It contains #EXT#, for example priya_fabrikam.com#EXT#@contoso.onmicrosoft.com.

    4. 4.Where do you limit invitations to certain domains?Show

      External Identities, External collaboration settings, Collaboration restrictions.

    5. 5.What do you select after adding seats for a group in error?Show

      Reprocess, on the group's Licenses blade.

    Official references

    Finished this lesson? Tick it off. Your progress is saved in this browser.

    Next up: Configure Self-Service Password Reset (SSPR)

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    Install MSDEVBUILD Azure

    Free · no account · works offline

    Save the whole course for offline ›

    Hi, I’m your Nimbus

    Your study buddy. Pick what we do next.

    MSDEVBUILD · Multi-Stack Dev Build

    Sign in to MSDEVBUILD

    One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.