Managing guest account access in Azure requires a thoughtful approach to ensure security and compliance. Guest accounts are external identities that don't have a direct connection to your organization's Active Directory.
To start, guest accounts can be created through Azure Active Directory (Azure AD) B2B collaboration. This feature enables you to invite external users to access your organization's resources, such as files or applications.
Guest accounts are typically used for short-term access, and their lifetimes can be managed through Azure AD. You can set expiration dates for guest accounts, ensuring they automatically revoke access after a certain period.
To maintain control over guest account access, Azure AD allows you to assign roles and permissions. This way, you can limit what external users can do within your organization's resources.
Setting Up Azure Guest Account
To set up an Azure Guest Account, you need to start by setting up the user as a Guest user in Azure Active Directory. This is the first step and it's quite straightforward.
You can use any trial tenant, such as contosodeb.onmicrosoft.com or xrm202016.onmicrosoft.com. For this example, let's use xrm202016.onmicrosoft.com.
To set up the user, navigate to the Azure portal at https://portal.azure.com and go to Azure Active Directory. Then, click on Users and select New Guest user.
Next, use the "Invite User" option and enter the details for the guest user. You'll need to provide the user's information, such as their name and email address.
Here are the specific steps to follow:
- Navigate to Azure Active Directory -> Users -> New Guest user.
- Use the option – “Invite User” and enter details for the guest user.
By following these steps, you can successfully set up an Azure Guest Account.
Understanding External Identities
External identities in Azure AD are created when you invite guests from outside your organization to collaborate with you. This can happen when you share documents or let them join a Microsoft 365 group or team.
Guest accounts are created with a unique identifier that looks like JoeBob_SomeDomain#EXT#@AzureTenant.onmicrosoft.com, where "Joe Bob" is the guest email address, "SomeDomain" is their SMTP domain, and "AzureTenant" is your Azure AD tenant namespace.
Guest accounts only show up in Azure and don't synchronize with local Active Directory, making them easy to overlook. They can be orphaned or unused if the remote external identity is deleted in their home directory.
Here are the three ways to implement B2B cross-tenant access:
- Default settings apply to all Azure tenants that are not specifically configured in the B2B collaboration or B2B direct-connect sections
- B2B collaboration settings apply to how guest accounts from remote domains are created in your tenant
- B2B direct-connect is a method of federation that does NOT create a guest user account in your Azure tenant
Azure B2C is a Consumer Identity Access Management (CIAM) Identity Provider (IdP) that supports OAuth 2.0, OpenID Connect (OIDC), and Microsoft Authentication Library (MSAL). It's a totally separate and isolated directory inside your Azure tenant.
Origin of External Identities
External identities in Azure AD are created when your tenant allows users to invite guests outside of your organization. This can happen when a user invites someone to share a document or join a group or team.
Guest accounts are created with a unique identifier that looks like JoeBob_SomeDomain#EXT#@AzureTenant.onmicrosoft.com. This identifier includes the guest's email address, SMTP domain, and your Azure AD tenant namespace.
Guest accounts only show up in Azure and never synchronize to a local Active Directory. This means they can often go unnoticed by administrators.
To manage guest access, it's recommended to create a "Guest User Access Policy" as part of your overall Security Policy. Once approved, you can implement security controls to manage guest accounts.
You can review the Azure tenant guest access settings by referring to the Microsoft document on guest sharing settings. This will walk you through all the places where guest accounts gain access in Outlook, Teams, OneDrive, and SharePoint.
To identify and control guest accounts, you can use the following reports and tools:
- Identity Obsolete Guest User Accounts
- Report for Azure Guest User Last Sign In
- Manage guest access with access reviews
- Create a more secure guest sharing environment
- Azure Active Directory: Automating Guest User Management
Today's Solution
Today's Solution is all about conversion, which is the key to maintaining the current assigned permissions and updating the UPN.
To modify the login ID from the Guest format to a standard format, you can run the command "Set the Usage Location" isn't necessary for this step, but it's a crucial one to assign a subscription plan.
Running the command "Set a Default Password" will generate a random default password and force the user to change it at the next login, ensuring security and compliance.
Conversion is a straightforward process that allows you to maintain the current assigned permissions, update the UPN, and license the accounts to prepare for data migrations.
The access and collaboration experience for the user remains the same until the migration is finalized, making the process as seamless as possible.
Managing Access and Permissions
Guest access in Azure is designed to be restrictive, with limited privileges to complete operations. This is evident when trying to access resources as a guest, where you'll encounter an 'Insufficient privileges to complete the operation' response.
When trying to search for users, even yourself, you'll be met with a blank page. This is not a bug, but rather a feature of guest-level access, intended to hide sensitive information.
To assign a Dynamics 365 license to a guest user, you can't use the Microsoft 365 admin center. Instead, you'll need to create a new security group in Azure Active Directory and add the guest user to it.
Assign D365 License
To assign a Dynamics 365 license to a Guest user, you won't be able to use the Microsoft 365 admin center like you would for regular users.
You'll need to create a new security group in Azure Active Directory.
Add the Guest user to the new security group.
Now, you can assign the Dynamics 365 license to the group, and the user will inherit the license.
Access Overview
Guest access is designed to be limited, and it's not meant to grant full access to resources.
In the Azure Admin Portal, switching to a guest tenant redirects you to the host-organization's tenant home portal.
You'll see that you're logged in with your guest account in the upper right-hand corner.
However, trying to access resources as a guest results in limited functionality.
The Users page shows no users and generates an "Insufficient privileges to complete the operation" response.
Searching for a valid user or even yourself doesn't work in this mode.
This is intentional, as guest-level access is supposed to hide certain areas, such as users and groups.
Conversion and Remediation
You can convert Azure B2B Guest Users to B2B Members using PowerShell, a multi-step process that requires proper permissions and installed modules.
To start, log into your Microsoft 365 tenant and get the Object ID for the Guest account you want to convert. You can do this by running the command "Get the Guest Object ID".
The conversion process involves updating the User Type from Guest to Member, which can be done by running the command "Update User Type". This action may be run during the final cutover event if desired.
After updating the User Type, you'll need to license the account, which can be done by running the command "License Account". This is necessary for migrations, especially if your organization uses hybrid identity management.
If you're experiencing issues with guest user access, you can remediate the problem by restricting guest user access permissions via the External Collaboration Settings. This can be done by following the instructions on the Microsoft documentation page.
B2B User Conversion
Converting Azure B2B Guest Users to B2B Members is a multi-step process that can be executed through PowerShell. The script you construct should consist of key actions outlined in the remainder of this article.
To start, you'll need to log into your target Microsoft 365 tenant with PowerShell where the Guest account currently resides. Get the Object ID for the specific Guest account you're going to convert to a B2B member by running the command "Get the Guest Object ID".
You can modify the User Type from Guest to Member by running the command "Update User Type". This action may be run during the final cutover event if desired, and it's recommended to synchronize your Active Directory passwords to make the process easier for your users during the transition event.
To set a subscription plan for a user, run the command "License Account". Most contemporary migration solutions require the user to be licensed prior to data migrations, with some exceptions using native tooling.
Here are the key actions to convert a Guest User to a B2B Member:
- Get the Guest Object ID
- Update User Type
- License Account
Once the above actions are completed against the designated users, they are almost ready to begin migrations. The mailbox must finish being procured by Exchange Online and the OneDrive container must be provisioned either manually or using your chosen migration tool.
Remediation
Remediation is a crucial step in addressing security flaws. Microsoft's default settings may not technically be a bug, but they can still cause issues.
The Azure Portal blocks this issue, but to fix it, you need to restrict guest user access permissions via the External Collaboration Settings. This can be done by following the instructions on the Microsoft documentation page.
Restricting guest user permissions will prevent the bad_guest script from finding multiple users' accounts. By limiting guest user access, you can prevent security flaws from occurring.
To restrict guest user permissions, you need to change the settings to only allow access to their own Directory objects. This will prevent the bad_guest script from finding multiple users' accounts.
This setting change will fix the flaw, and the bad_guest script will only find one user's account - your own - and then error out when trying to retrieve group lists.
Automation and Tools
PowerShell is a great tool for interacting with Azure AD and M365, and it's what we'll be using to automate our tasks.
Microsoft provides some modules with a wide range of capabilities, including the Azure AD and MsolService modules.
The MsolService module does not support B2B tenant interactions, unfortunately, which is why we'll be using the Az.Auth module instead.
To get started, we'll need to find our tenant ID for our guest organization.
A script called bad_guest.ps1 will do all the hard work for us, but we'll need to authenticate twice to make the initial requests with our home tenant and then again to auth to the guest tenant.
This script will retrieve group members and owners for any groups our guest user is a member of, and then spread out to enumerate groups and users.
When it's done, it will use those GUIDs to dump information, including:
- User list
- Group list
- Group membership list
- Application list
Some details of the user profile information, such as address or other personal information, will be missing unless our guest permissions have been modified from the baseline.
User Experience and Governance
As a user of Azure Guest Accounts, you might be wondering what to expect from the user experience. Jane Doe, a Guest user, can easily switch between organizations, as illustrated in Figure 3, making it seamless to collaborate in Teams.
Jane's experience remains largely unchanged even after being converted from an Azure B2B Guest User to a B2B Member, as shown in Figure 4. She retains all her access, chat history, and functionality, making the migration process as smooth as possible.
In fact, Jane won't even notice the changes to her new target account, except for the absence of the word "Guest" next to her name.
Teams Access Governance via Roles and PIM
Teams can access governance via roles and PIM, which helps ensure that only authorized personnel can view and edit sensitive information.
Roles and permissions are essential for access governance, and PIM systems can help manage these roles and permissions.
For example, a company might have a role for "HR Manager" that grants access to certain employee data, but not to sensitive financial information.
Roles can be customized to fit the needs of your organization, and PIM systems can help streamline the process of assigning and managing these roles.
In a PIM system, roles are often organized into a hierarchy, with higher-level roles granting access to more sensitive information.
This helps prevent accidental or unauthorized access to sensitive data, and ensures that only authorized personnel can perform critical tasks.
User Experience
The user experience is a top priority in this process. Jane Doe, a Guest user, can switch between organizations with ease, as seen in Figure 3.
She can collaborate in Teams without interruption, retaining all her access and chat history.
Jane's migration experience is smooth, with no loss of functionality.
In fact, she won't even notice the changes made to her new target account, except for the absence of the word "Guest" next to her name.
Her access and history remain intact, making the migration process seamless.
My Conclusions
Microsoft B2B functionality is a game-changer for integration migration projects, offering a range of options for setting up coexistence between tenants.
Before B2B, administrators had to create new credentials and users had to manage switching between identities, which was not ideal.
Using source credentials to access target resources prior to migration is a great option for future integration projects.
This method is particularly useful for power users who require rich collaboration, and it's nice to know it's available when needed.
Isolating this method to power users is a good approach, as it's not practical for all Azure B2B guest users.
Comments
Comments play a crucial role in shaping the user experience and governance of a system. A well-designed comment system can foster a sense of community and encourage users to engage with each other.
User feedback, often collected through comments, can be a valuable resource for identifying areas of improvement. This is evident in the example of a company that revamped its comment system to prioritize user feedback, resulting in a 30% increase in user satisfaction.
In a governance context, comments can be used to track decisions and actions taken. This can be seen in the case of a project management tool that utilizes comments to document changes to project scope, ensuring transparency and accountability.
Effective comment management is essential for maintaining a positive user experience. By implementing features like comment moderation and tagging, organizations can ensure that comments remain relevant and on-topic.
A comment system that is easy to use can significantly improve user engagement. This is demonstrated by the example of a website that simplified its comment system, resulting in a 25% increase in user comments within the first month.
Frequently Asked Questions
What is the difference between an Azure guest account and an external account?
An Azure guest account allows temporary access to a team for external users, while an external account enables ongoing access to Microsoft identities across organizations
What are the limitations of Microsoft guest account?
Microsoft guest accounts have restricted access, limiting guests to viewing only their own user profile and preventing them from seeing group memberships or other users' information
Sources
- https://community.dynamics.com/blogs/post/
- https://practical365.com/azure-ad-external-identities/
- https://microsoft365pro.co.uk/2022/01/16/teams-real-simple-with-pictures-governing-guest-access-via-azure-ad-roles-and-pim/
- https://practical365.com/how-to-convert-azure-b2b-guest-users-to-members-while-maintaining-user-collaboration/
- https://trustedsec.com/blog/unwelcome-guest-abusing-azure-guest-access-to-dump-users-groups-and-more
Featured Images: pexels.com