Azure Ad b2b
Azure Ad b2b
Azure Active Directory (Azure AD ) business-to-business (B2B ) collaboration lets you securely share your
company's applications and services with guest users from any other organization, while maintaining control
over your own corporate data. Work safely and securely with external partners, large or small, even if they don't
have Azure AD or an IT department. A simple invitation and redemption process lets partners use their own
credentials to access your company's resources. Developers can use Azure AD business-to-business APIs to
customize the invitation process or write applications like self-service sign-up portals.
Watch the video learn how you can securely collaborate with guest users by inviting them to sign in to your
company's apps and services using their own identities.
The following video provides a useful overview.
Both Azure Active Directory (Azure AD ) B2B collaboration and Azure AD B2C allow you to work with external
users in Azure AD. But how do they compare?
Azure AD B2B is for businesses that want to securely share files and resources with external users so they can
collaborate. An Azure admin sets up B2B in the Azure portal, and Azure AD takes care of federation between your
business and your external partner. Users sign in to the shared resources using a simple invitation and redemption
process with their work or school account, or any email account.
Azure AD B2C is primarily for businesses and developers that create customer-facing apps. With Azure AD B2C,
developers can use Azure AD as the full-featured identity system for their application, while letting customers sign
in with an identity they already have established (like Facebook or Gmail).
The table below gives a detailed comparison.
Intended for: Organizations that want to be able to Intended for: Inviting customers of your mobile and web apps,
authenticate users from a partner organization, regardless of whether individuals, institutional or organizational customers
identity provider. into your Azure AD.
Identities supported: Employees with work or school accounts, Identities supported: Consumer users with local application
partners with work or school accounts, or any email address. accounts (any email address or user name) or any supported
Soon to support direct federation. social identity with direct federation.
External users are managed in the same directory as External users are managed in the application directory.
employees, but annotated specially. They can be managed the They're managed separately from the organization’s employee
same way as employees, they can be added to the same and partner directory (if any).
groups, and so on
Single sign-on (SSO) to all Azure AD-connected apps is SSO to customer owned apps within the Azure AD B2C
supported. For example, you can provide access to Office 365 tenants is supported. SSO to Office 365 or to other Microsoft
or on-premises apps, and to other SaaS apps such as SaaS apps is not supported.
Salesforce or Workday.
Partner lifecycle: Managed by the host/inviting organization. Customer lifecycle: Self-serve or managed by the application.
Security policy and compliance: Managed by the host/inviting Security policy and compliance: Managed by the application.
organization (for example, with Conditional Access policies).
Branding: Host/inviting organization’s brand is used. Branding: Managed by application. Typically tends to be
product branded, with the organization fading into the
background.
More info: Blog post, Documentation More info: Product page, Documentation
Next steps
What is Azure AD B2B collaboration?
B2B collaboration user properties
Quickstart: Add guest users to your directory in the
Azure portal
5/16/2019 • 2 minutes to read • Edit Online
You can invite anyone to collaborate with your organization by adding them to your directory as a guest user. Then
you can either send an invitation email that contains a redemption link or send a direct link to an app you want to
share. Guest users can sign in with their own work, school, or social identities.
In this quickstart, you'll add a new guest user to Azure AD, send an invitation, and see what the guest user's
invitation redemption process looks like.
If you don’t have an Azure subscription, create a free account before you begin.
Prerequisites
To complete the scenario in this tutorial, you need:
A role that allows you to create users in your tenant directory, like the Global Administrator role or any of the
limited administrator directory roles.
A valid email account that you can add to your tenant directory, and that you can use to receive the test
invitation email.
5. Under User name, enter the email address of the external user. Under Include a personal message with
the invitation, type a welcome message.
6. Select Invite to automatically send the invitation to the guest user. A notification appears in the upper right
with the message Successfully invited user.
7. After you send the invitation, the user account is automatically added to the directory as a guest.
4. Select Accept. The Access Panel opens, which lists the applications the guest user can access.
Clean up resources
When no longer needed, delete the test guest user and the test app.
1. Sign in to the Azure portal as an Azure AD administrator.
2. In the left pane, select Azure Active Directory.
3. Under Manage, select Enterprise applications.
4. Open the application Salesforce, and then select Delete.
5. In the left pane, select Azure Active Directory.
6. Under Manage, select Users.
7. Select the test user, and then select Delete user.
Next steps
In this tutorial, you created a guest user in the Azure portal, and sent an invitation to share apps. Then you viewed
the redemption process from the guest user's perspective and verified that the app appeared on the guest user's
Access Panel. To learn more about adding guest users for collaboration, see Add Azure Active Directory B2B
collaboration users in the Azure portal.
Quickstart: Add a guest user with PowerShell
5/16/2019 • 2 minutes to read • Edit Online
There are many ways you can invite external partners to your apps and services with Azure Active Directory B2B
collaboration. In the previous quickstart, you saw how to add guest users directly in the Azure Active Directory
admin portal. You can also use PowerShell to add guest users, either one at a time or in bulk. In this quickstart,
you’ll use the New -AzureADMSInvitation command to add one guest user to your Azure tenant.
If you don’t have an Azure subscription, create a free account before you begin.
Prerequisites
Install the latest AzureADPreview module
Make sure that you install the latest version of the Azure AD PowerShell for Graph module (AzureADPreview ).
First, check which modules you have installed. Open Windows PowerShell as an elevated user (Run as
administrator), and run the following command:
If the AzureADPreview module displays with no message indicating there’s a later version, you’re set. Otherwise,
based on the output, do one of the following:
If no results are returned, run the following command to install the AzureADPreview module:
Install-Module AzureADPreview
If only the AzureAD module shows up in the results, run the following commands to install the
AzureADPreview module:
Uninstall-Module AzureAD
Install-Module AzureADPreview
If only the AzureADPreview module shows up in the results, but you receive a message that indicates there's
a later version, run the following commands to update the module:
Uninstall-Module AzureADPreview
Install-Module AzureADPreview
You might receive a prompt that you're installing the module from an untrusted repository. This occurs if you
haven't previously set the PSGallery repository as a trusted repository. Press Y to install the module.
Get a test email account
You need a test email account that you can send the invitation to. The account must be from outside your
organization. You can use any type of account, including a social account such as a gmail.com or outlook.com
address.
Send an invitation
1. To send an invitation to your test email account, run the following PowerShell command (replace "Sanda"
and [email protected] with your test email account name and email address):
2. The command sends an invitation to the email address specified. Check the output, which should look
similar to the following:
2. Check the output to make sure the user you invited is listed, with a user principal name (UPN ) in the format
emailaddress#EXT#@domain. For example, sanda_fabrikam.com#EXT#@contoso.onmicrosoft.com, where
contoso.onmicrosoft.com is the organization from which you sent the invitations.
Clean up resources
When no longer needed, you can delete the test user account in the directory. Run the following command to
delete a user account:
Next steps
In this quickstart, you invited and added a single guest user to your directory using PowerShell. Next, learn how to
invite guest users in bulk using PowerShell.
Tutorial: Bulk invite Azure AD B2B collaboration users
Tutorial: Bulk invite Azure AD B2B collaboration users
(preview)
9/19/2019 • 3 minutes to read • Edit Online
This article describes a public preview feature of Azure Active Directory. For more information about previews, see Supplemental
Terms of Use for Microsoft Azure Previews.
If you use Azure Active Directory (Azure AD ) B2B collaboration to work with external partners, you can invite
multiple guest users to your organization at the same time. In this tutorial, you learn how to use the Azure portal to
send bulk invitations to external users. Specifically, you do the following:
Use Bulk invite users (Preview) to prepare a comma-separated value (.csv) file with the user information and
invitation preferences
Upload the .csv file to Azure AD
Verify the users were added to the directory
If you don’t have Azure Active Directory, create a free account before you begin.
Prerequisites
You need two or more test email accounts that you can send the invitations to. The accounts must be from outside
your organization. You can use any type of account, including social accounts such as gmail.com or outlook.com
addresses.
5. Open the .csv file and add a line for each guest user. Required values are:
Email address to invite - the user who will receive an invitation
Redirection url - the URL to which the invited user is forwarded after accepting the invitation
NOTE
Don't use commas in the Customized invitation message because they'll prevent the message from being parsed
successfully.
11. When the job completes, you'll see a notification that the bulk operation succeeded.
You should see the users that you invited listed, with a user principal name (UPN ) in the format
emailaddress#EXT#@domain. For example, lstokes_fabrikam.com#EXT#@contoso.onmicrosoft.com, where
contoso.onmicrosoft.com is the organization from which you sent the invitations.
Clean up resources
When no longer needed, you can delete the test user accounts in the directory in the Azure portal on the Users
page by selecting the checkbox next to the guest user and then selecting Delete.
Or you can run the following PowerShell command to delete a user account:
Next steps
In this tutorial, you sent bulk invitations to guest users outside of your organization. Next, learn how the invitation
redemption process works.
Learn about the Azure AD B2B collaboration invitation redemption process
Tutorial: Enforce multi-factor authentication for B2B
guest users
6/13/2019 • 4 minutes to read • Edit Online
When collaborating with external B2B guest users, it’s a good idea to protect your apps with multi-factor
authentication (MFA) policies. Then external users will need more than just a user name and password to access
your resources. In Azure Active Directory (Azure AD ), you can accomplish this goal with a Conditional Access
policy that requires MFA for access. MFA policies can be enforced at the tenant, app, or individual guest user level,
the same way that they are enabled for members of your own organization.
Example:
1. An admin or employee at Company A invites a guest user to use a cloud or on-premises application that is
configured to require MFA for access.
2. The guest user signs in with their own work, school, or social identity.
3. The user is asked to complete an MFA challenge.
4. The user sets up MFA with Company A and chooses their MFA option. The user is allowed access to the
application.
In this tutorial, you will:
Test the sign-in experience before MFA setup.
Create a Conditional Access policy that requires MFA for access to a cloud app in your environment. In this
tutorial, we’ll use the Microsoft Azure Management app to illustrate the process.
Use the What If tool to simulate MFA sign-in.
Test your Conditional Access policy.
Clean up the test user and policy.
If you don’t have an Azure subscription, create a free account before you begin.
Prerequisites
To complete the scenario in this tutorial, you need:
Access to Azure AD Premium edition, which includes Conditional Access policy capabilities. To enforce MFA,
you need to create an Azure AD Conditional Access policy. Note that MFA policies are always enforced at your
organization, regardless of whether the partner has MFA capabilities. If you set up MFA for your organization,
you’ll need to make sure you have sufficient Azure AD Premium licenses for your guest users.
A valid external email account that you can add to your tenant directory as a guest user and use to sign in. If
you don't know how to create a guest account, see Add a B2B guest user in the Azure portal.
5. Under User name, enter the email address of the external user. Optionally, include a welcome message.
6. Select Invite to automatically send the invitation to the guest user. A Successfully invited user message
appears.
7. After you send the invitation, the user account is automatically added to the directory as a guest.
8. Select Done.
9. On the New page, in the Assignments section, select Cloud apps.
10. On the Cloud apps page, choose Select apps, and then choose Select.
11. On the Select page, choose Microsoft Azure Management, and then choose Select.
12. On the Cloud apps page, select Done.
13. On the New page, in the Access controls section, select Grant.
14. On the Grant page, choose Grant access, select the Require multi-factor authentication check box, and
then choose Select.
3. Sign out.
Clean up resources
When no longer needed, remove the test user and the test Conditional Access policy.
1. Sign in to the Azure portal as an Azure AD administrator.
2. In the left pane, select Azure Active Directory.
3. Under Manage, select Users.
4. Select the test user, and then select Delete user.
5. In the left pane, select Azure Active Directory.
6. Under Security, select Conditional Access.
7. In the Policy Name list, select the context menu (…) for your test policy, and then select Delete. Select Yes to
confirm.
Next steps
In this tutorial, you’ve created a Conditional Access policy that requires guest users to use MFA when signing in to
one of your cloud apps. To learn more about adding guest users for collaboration, see Add Azure Active Directory
B2B collaboration users in the Azure portal.
Self-service portal for Azure AD B2B collaboration
sign-up
5/16/2019 • 2 minutes to read • Edit Online
Customers can do a lot with the built-in features that are exposed through the Azure portal and the Application
Access Panel for end users. However, you might need to customize the onboarding workflow for B2B users to fit
your organization’s needs. You can do that with the invitation API.
As an inviting organization, you may not know ahead of time who the individual external collaborators are who
need access to your resources. You need a way for users from partner companies to sign themselves up with a set
of policies that you as the inviting organization controls. This scenario is possible through the APIs. There's a
sample project on GitHub that does just that.
This GitHub project shows how organizations can use the APIs to provide a policy-based, self-service sign-up
capability for your trusted partners, with rules that determine the apps they can access. Partner users can get access
to resources when they need them. They can do this securely, without requiring the inviting organization to
manually onboard them. You can easily deploy the project into an Azure subscription of your choice.
As-is code
This code is made available as a sample to demonstrate usage of the Azure Active Directory B2B invitation API. It
should be customized by your development team or a partner, and should be reviewed before you deploy it in a
production scenario.
Next steps
What is Azure AD B2B collaboration?
Azure AD B2B collaboration licensing
Azure Active Directory B2B collaboration frequently asked questions (FAQ )
Azure Active Directory B2B collaboration code and
PowerShell samples
5/16/2019 • 3 minutes to read • Edit Online
PowerShell example
You can bulk-invite external users to an organization from email addresses that you have stored in a .CSV file.
1. Prepare the .CSV file Create a new CSV file and name it invitations.csv. In this example, the file is saved in
C:\data, and contains the following information:
NAME INVITEDUSEREMAILADDRESS
2. Get the latest Azure AD PowerShell To use the new cmdlets, you must install the updated Azure AD
PowerShell module, which you can download from the Powershell module's release page
3. Sign in to your tenancy
$cred = Get-Credential
Connect-AzureAD -Credential $cred
This cmdlet sends an invitation to the email addresses in invitations.csv. Additional features of this cmdlet include:
Customized text in the email message
Including a display name for the invited user
Sending messages to CCs or suppressing email messages altogether
Code sample
Here we illustrate how to call the invitation API, in "app-only" mode, to get the redemption URL for the resource to
which you are inviting the B2B user. The goal is to send a custom invitation email. The email can be composed with
an HTTP client, so you can customize how it looks and send it through Graph API.
namespace SampleInviteApp
{
using System;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using Microsoft.IdentityModel.Clients.ActiveDirectory;
using Newtonsoft.Json;
class Program
{
/// <summary>
/// Microsoft graph resource.
/// </summary>
static readonly string GraphResource = "https://graph.microsoft.com";
/// <summary>
/// Microsoft graph invite endpoint.
/// </summary>
static readonly string InviteEndPoint = "https://graph.microsoft.com/v1.0/invitations";
/// <summary>
/// Authentication endpoint to get token.
/// </summary>
static readonly string EstsLoginEndpoint = "https://login.microsoftonline.com";
/// <summary>
/// This is the tenantid of the tenant you want to invite users to.
/// </summary>
private static readonly string TenantID = "";
/// <summary>
/// This is the application id of the application that is registered in the above tenant.
/// The required scopes are available in the below link.
/// https://developer.microsoft.com/graph/docs/api-reference/v1.0/api/invitation_post
/// </summary>
private static readonly string TestAppClientId = "";
/// <summary>
/// Client secret of the application.
/// </summary>
private static readonly string TestAppClientSecret = @"";
/// <summary>
/// This is the email address of the user you want to invite.
/// </summary>
private static readonly string InvitedUserEmailAddress = @"";
/// <summary>
/// This is the display name of the user you want to invite.
/// </summary>
private static readonly string InvitedUserDisplayName = @"";
/// <summary>
/// Main method.
/// </summary>
/// <param name="args">Optional arguments</param>
static void Main(string[] args)
{
Invitation invitation = CreateInvitation();
SendInvitation(invitation);
}
/// <summary>
/// Create the invitation object.
/// </summary>
/// <returns>Returns the invitation object.</returns>
private static Invitation CreateInvitation()
{
// Set the invitation object.
Invitation invitation = new Invitation();
invitation.InvitedUserDisplayName = InvitedUserDisplayName;
invitation.InvitedUserEmailAddress = InvitedUserEmailAddress;
invitation.InviteRedirectUrl = "https://www.microsoft.com";
invitation.SendInvitationMessage = true;
return invitation;
}
/// <summary>
/// Send the guest user invite request.
/// </summary>
/// <param name="invitation">Invitation object.</param>
private static void SendInvitation(Invitation invitation)
{
string accessToken = GetAccessToken();
/// <summary>
/// Get the HTTP client.
/// </summary>
/// <param name="accessToken">Access token</param>
/// <returns>Returns the Http Client.</returns>
private static HttpClient GetHttpClient(string accessToken)
{
// setup http client.
HttpClient httpClient = new HttpClient();
httpClient.Timeout = TimeSpan.FromSeconds(300);
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer",
accessToken);
httpClient.DefaultRequestHeaders.Add("client-request-id", Guid.NewGuid().ToString());
Console.WriteLine(
"CorrelationID for the request: {0}",
httpClient.DefaultRequestHeaders.GetValues("client-request-id").Single());
return httpClient;
}
/// <summary>
/// Get the access token for our application to talk to microsoft graph.
/// </summary>
/// <returns>Returns the access token for our application to talk to microsoft graph.</returns>
private static string GetAccessToken()
{
string accessToken = null;
// Get the access token for our application to talk to microsoft graph.
try
{
AuthenticationContext testAuthContext =
new AuthenticationContext(string.Format("{0}/{1}", EstsLoginEndpoint, TenantID));
AuthenticationResult testAuthResult = testAuthContext.AcquireTokenAsync(
GraphResource,
new ClientCredential(TestAppClientId, TestAppClientSecret)).Result;
accessToken = testAuthResult.AccessToken;
}
catch (AdalException ex)
{
Console.WriteLine("An exception was thrown while fetching the token: {0}.", ex);
throw;
}
return accessToken;
}
/// <summary>
/// Invitation class.
/// </summary>
public class Invitation
{
/// <summary>
/// Gets or sets display name.
/// </summary>
public string InvitedUserDisplayName { get; set; }
/// <summary>
/// Gets or sets display name.
/// </summary>
public string InvitedUserEmailAddress { get; set; }
/// <summary>
/// Gets or sets a value indicating whether Invitation Manager should send the email to
InvitedUser.
/// </summary>
public bool SendInvitationMessage { get; set; }
/// <summary>
/// Gets or sets invitation redirect URL
/// </summary>
public string InviteRedirectUrl { get; set; }
}
}
}
Next steps
What is Azure AD B2B collaboration?
Azure Active Directory B2B collaboration licensing
guidance
8/29/2019 • 2 minutes to read • Edit Online
With Azure Active Directory (Azure AD ) business-to-business (B2B ) collaboration, you can invite External Users
(or "guest users") to use your paid Azure AD services. Some features are free, but for any paid Azure AD features,
you can invite up to five guest users for each Azure AD edition license that you own for an employee or a non-
guest user in your tenant.
NOTE
Refer to Azure Active Directory pricing for details about Azure AD pricing and B2B collaboration features.
B2B guest user licensing is automatically calculated and reported based on the 1:5 ratio. Currently, it’s not possible
to assign B2B guest user licenses directly to guest users.
Additionally, guest users can use free Azure AD features with no additional licensing requirements. Guest users
have access to free Azure AD features even if you don’t have any paid Azure AD licenses.
Next steps
See the following resources on Azure AD B2B collaboration:
Azure Active Directory pricing
What is Azure AD B2B collaboration?
Azure Active Directory B2B collaboration frequently asked questions (FAQ )
Office 365 external sharing and Azure Active
Directory B2B collaboration
6/7/2019 • 2 minutes to read • Edit Online
External sharing in Office 365 (OneDrive, SharePoint Online, Unified Groups, etc.) and Azure Active Directory
(Azure AD ) B2B collaboration are technically the same thing. All external sharing (except OneDrive/SharePoint
Online), including guests in Office 365 Groups, already uses the Azure AD B2B collaboration invitation APIs for
sharing.
Next steps
What is Azure AD B2B collaboration?
Adding a B2B collaboration user to a role
Delegate B2B collaboration invitations
Dynamic groups and B2B collaboration
Troubleshooting Azure Active Directory B2B collaboration
Azure Active Directory B2B collaboration invitation
redemption
8/19/2019 • 4 minutes to read • Edit Online
This article describes the ways guest users can access your resources and the consent process they'll encounter. If
you send an invitation email to the guest, the invitation includes a link the guest can redeem to get access to your
app or portal. The invitation email is just one of the ways guests can get access to your resources. As an
alternative, you can add guests to your directory and give them a direct link to the portal or app you want to
share. Regardless of the method they use, guests are guided through a first-time consent process. This process
ensures that your guests agree to privacy terms and accept any terms of use you've set up.
When you add a guest user to your directory, the guest user account has a consent status (viewable in
PowerShell) that’s initially set to PendingAcceptance. This setting remains until the guest accepts your
invitation and agrees to your privacy policy and terms of use. After that, the consent status changes to Accepted,
and the consent pages are no longer presented to the guest.
IMPORTANT
The direct link must be tenant-specific. In other words, it must include a tenant ID or verified domain so the guest can be
authenticated in your tenant, where the shared app is located. A common URL like https://myapps.microsoft.com won’t
work for a guest because it will redirect to their home tenant for authentication. Here are some examples of direct links with
tenant context:
Apps access panel: https://myapps.microsoft.com/?tenantid=<tenant id>
Apps access panel for a verified domain: https://myapps.microsoft.com/<verified domain>
Azure portal: https://portal.azure.com/<tenant id>
Individual app: see how to use a direct sign-on link
There are some cases where the invitation email is recommended over a direct link. If these special cases are
important to your organization, we recommend that you invite users by using methods that still send the
invitation email:
The user doesn’t have an Azure AD account, an MSA, or an email account in a federated organization. Unless
you're using the one-time passcode feature, the guest needs to redeem the invitation email to be guided
through the steps for creating an MSA.
Sometimes the invited user object may not have an email address because of a conflict with a contact object
(for example, an Outlook contact object). In this case, the user must click the redemption URL in the invitation
email.
The user may sign in with an alias of the email address that was invited. (An alias is an additional email
address associated with an email account.) In this case, the user must click the redemption URL in the
invitation email.
NOTE
For information about how you as a tenant administrator can link to your organization's privacy statement, see
How-to: Add your organization's privacy info in Azure Active Directory.
2. If terms of use are configured, the guest opens and reviews the terms of use, and then selects Accept.
NOTE
You can configure see terms of use in Manage > Organizational relationships > Terms of use.
3. Unless otherwise specified, the guest is redirected to the Apps access panel, which lists the applications the
guest can access.
In your directory, the guest's Invitation accepted value changes to Yes. If an MSA was created, the guest’s
Source shows Microsoft Account. For more information about guest user account properties, see Properties of
an Azure AD B2B collaboration user.
Next steps
What is Azure AD B2B collaboration?
Add Azure Active Directory B2B collaboration users in the Azure portal
How do information workers add B2B collaboration users to Azure Active Directory?
Add Azure Active Directory B2B collaboration users by using PowerShell
Leave an organization as a guest user
The elements of the B2B collaboration invitation
email - Azure Active Directory
5/16/2019 • 3 minutes to read • Edit Online
Invitation emails are a critical component to bring partners on board as B2B collaboration users in Azure AD. You
can use them to increase the recipient's trust. you can add legitimacy and social proof to the email, to make sure
the recipient feels comfortable with selecting the Get Started button to accept the invitation. This trust is a key
means to reduce sharing friction. And you also want to make the email look great!
Explaining the email
Let's look at a few elements of the email so you know how best to use their capabilities.
Subject
The subject of the email follows the following pattern: You're invited to the <tenantname> organization
From address
We use a LinkedIn-like pattern for the From address. You should be clear who the inviter is and from which
company, and also clarify that the email is coming from a Microsoft email address. The format is: Microsoft
Invitations [email protected] or <Display name of inviter> from <tenantname> (via Microsoft)
[email protected].
Reply To
The reply-to email is set to the inviter's email when available, so that replying to the email sends an email back to
the inviter.
Branding
The invitation emails from your tenant use the company branding that you may have set up for your tenant. If you
want to take advantage of this capability, here are the details on how to configure it. The banner logo appears in
the email. Follow the image size and quality instructions here for best results. In addition, the company name also
shows up in the call to action.
Call to action
The call to action consists of two parts: explaining why the recipient has received the mail and what the recipient is
being asked to do about it.
The "why" section can be addressed using the following pattern: You've been invited to access applications
in the <tenantname> organization
And the "what you're being asked to do" section is indicated by the presence of the Get Started button.
When the recipient has been added without the need for invitations, this button doesn't show up.
Inviter's information
The inviter's display name is included in the email. And in addition, if you've set up a profile picture for your Azure
AD account, the inviting email will include that picture as well. Both are intended to increase your recipient's
confidence in the email.
If you haven't yet set up your profile picture, an icon with the inviter's initials in place of the picture is shown:
Body
The body contains the message that the inviter composes when inviting a guest user to the directory, group, or app
or by using the invitation API. It is a text area, so it does not process HTML tags for security reasons.
Footer section
The footer contains the Microsoft company brand and lets the recipient know if the email was sent from an
unmonitored alias.
Special cases:
The inviter doesn't have an email address in the inviting tenancy
Next steps
See the following articles on Azure AD B2B collaboration:
What is Azure AD B2B collaboration
How do Azure Active Directory admins add B2B collaboration users?
How do information workers add B2B collaboration users?
B2B collaboration invitation redemption
Add B2B collaboration users without an invitation
Properties of an Azure Active Directory B2B
collaboration user
5/16/2019 • 5 minutes to read • Edit Online
This article describes the properties and states of the B2B guest user object in Azure Active Directory (Azure AD )
before and after invitation redemption. An Azure AD business-to-business (B2B ) collaboration user is a user with
UserType = Guest. This guest user typically is from a partner organization and has limited privileges in the inviting
directory, by default.
Depending on the inviting organization's needs, an Azure AD B2B collaboration user can be in one of the following
account states:
State 1: Homed in an external instance of Azure AD and represented as a guest user in the inviting
organization. In this case, the B2B user signs in by using an Azure AD account that belongs to the invited
tenant. If the partner organization doesn't use Azure AD, the guest user in Azure AD is still created. The
requirements are that they redeem their invitation and Azure AD verifies their email address. This
arrangement is also called a just-in-time (JIT) tenancy or a "viral" tenancy.
State 2: Homed in a Microsoft or other account and represented as a guest user in the host organization. In
this case, the guest user signs in with a Microsoft account or a social account (google.com or similar). The
invited user's identity is created as a Microsoft account in the inviting organization’s directory during offer
redemption.
State 3: Homed in the host organization's on-premises Active Directory and synced with the host
organization's Azure AD. You can use Azure AD Connect to sync the partner accounts to the cloud as Azure
AD B2B users with UserType = Guest. See Grant locally-managed partner accounts access to cloud
resources.
State 4: Homed in the host organization's Azure AD with UserType = Guest and credentials that the host
organization manages.
Now, let's see what an Azure AD B2B collaboration user looks like in Azure AD.
Before invitation redemption
State 1 and State 2 accounts are the result of inviting guest users to collaborate by using the guest users' own
credentials. When the invitation is initially sent to the guest user, an account is created in your directory. This
account doesn’t have any credentials associated with it because authentication is performed by the guest user's
identity provider. The Source property for the guest user account in your directory is set to Invited user.
For guest users in State 3 and State 4, the Source property is set to Azure Active Directory or Windows Server
Active Directory, as described in the next section.
NOTE
The UserType has no relation to how the user signs in, the directory role of the user, and so on. This property simply
indicates the user's relationship to the host organization and allows the organization to enforce policies that depend
on this property.
Source
This property indicates how the user signs in.
Invited User: This user has been invited but has not yet redeemed an invitation.
External Active Directory: This user is homed in an external organization and authenticates by using an
Azure AD account that belongs to the other organization. This type of sign-in corresponds to State 1.
Microsoft account: This user is homed in a Microsoft account and authenticates by using a Microsoft
account. This type of sign-in corresponds to State 2.
Windows Server Active Directory: This user is signed in from on-premises Active Directory that belongs to
this organization. This type of sign-in corresponds to State 3.
Azure Active Directory: This user authenticates by using an Azure AD account that belongs to this
organization. This type of sign-in corresponds to State 4.
NOTE
Source and UserType are independent properties. A value of Source does not imply a particular value for UserType.
Next steps
What is Azure AD B2B collaboration?
B2B collaboration user tokens
B2B collaboration user claims mapping
B2B collaboration user claims mapping in Azure
Active Directory
5/16/2019 • 2 minutes to read • Edit Online
Azure Active Directory (Azure AD ) supports customizing the claims that are issued in the SAML token for B2B
collaboration users. When a user authenticates to the application, Azure AD issues a SAML token to the app that
contains information (or claims) about the user that uniquely identifies them. By default, this includes the user's
user name, email address, first name, and last name.
In the Azure portal, you can view or edit the claims that are sent in the SAML token to the application. To access
the settings, select Azure Active Directory > Enterprise applications > the application that's configured for
single sign-on > Single sign-on. See the SAML token settings in the User Attributes section.
There are two possible reasons why you might need to edit the claims that are issued in the SAML token:
1. The application requires a different set of claim URIs or claim values.
2. The application requires the NameIdentifier claim to be something other than the user principal name
(UPN ) that's stored in Azure AD.
For information about how to add and edit claims, see Customizing claims issued in the SAML token for
enterprise applications in Azure Active Directory.
For B2B collaboration users, mapping NameID and UPN cross-tenant are prevented for security reasons.
Next steps
For information about B2B collaboration user properties, see Properties of an Azure Active Directory B2B
collaboration user.
For information about user tokens for B2B collaboration users, see Understand user tokens in Azure AD B2B
collaboration.
Understand user tokens in Azure AD B2B
collaboration
5/16/2019 • 2 minutes to read • Edit Online
If you want to know what the token looks like for a B2B collaboration user, here are the bearer token details and
token content for an Azure Active Directory (Azure AD ) guest and a Microsoft account guest in the resource
tenant (for tenantid 04dcc6ab-388a-4559-b527-fbec656300ea). To see the JSON Web Token (JWT) contents, use
https://jwt.io/ or https://jwt.ms/.
Next steps
What is Azure AD B2B collaboration?
B2B collaboration user properties
B2B collaboration user claims mapping
Conditional Access for B2B collaboration users
7/19/2019 • 3 minutes to read • Edit Online
$cred = Get-Credential
Connect-MsolService -Credential $cred
Here is an example:
Get-MsolUser | where { $_.StrongAuthenticationMethods} | select UserPrincipalName, @{n="Methods";e=
{($_.StrongAuthenticationMethods).MethodType}}
3. Reset the MFA method for a specific user to require the B2B collaboration user to set proof-up methods
again. Example:
Next steps
See the following articles on Azure AD B2B collaboration:
What is Azure AD B2B collaboration?
Azure AD B2B collaboration licensing
Azure Active Directory B2B collaboration frequently asked questions (FAQ )
Azure Active Directory B2B collaboration for hybrid
organizations
5/16/2019 • 2 minutes to read • Edit Online
Azure Active Directory (Azure AD ) B2B collaboration makes it easy for you to give your external partners access to
apps and resources in your organization. This is true even in a hybrid configuration where you have both on-
premises and cloud-based resources. It doesn’t matter if you currently manage external partner accounts locally in
your on-premises identity system, or if you manage the external accounts in the cloud as Azure AD B2B users. You
can now grant these users access to resources in either location, using the same sign-in credentials for both
environments.
Next steps
Grant B2B users in Azure AD access to your on-premises applications
Grant locally-managed partner accounts access to cloud resources using Azure AD B2B collaboration
Limitations of Azure AD B2B collaboration
6/13/2019 • 2 minutes to read • Edit Online
Azure Active Directory (Azure AD ) B2B collaboration is currently subject to the limitations described in this article.
Instant-on
In the B2B collaboration flows, we add users to the directory and dynamically update them during invitation
redemption, app assignment, and so on. The updates and writes ordinarily happen in one directory instance and
must be replicated across all instances. Replication is completed once all instances are updated. Sometimes when
the object is written or updated in one instance and the call to retrieve this object is to another instance, replication
latencies can occur. If that happens, refresh or retry to help. If you are writing an app using our API, then retries
with some back-off is a good, defensive practice to alleviate this issue.
Azure AD directories
Azure AD B2B is subject to Azure AD service directory limits. For details about the number of directories a user
can create and the number of directories to which a user or guest user can belong, see Azure AD service limits and
restrictions.
National clouds
National clouds are physically isolated instances of Azure. B2B collaboration is not supported across national cloud
boundaries. For example, if your Azure tenant is in the public, global cloud, you can't invite a user whose account is
in a national cloud. To collaborate with the user, ask them for another email address or create a member user
account for them in your directory.
Next steps
See the following articles on Azure AD B2B collaboration:
What is Azure AD B2B collaboration?
Delegate B2B collaboration invitations
Enable B2B external collaboration and manage who
can invite guests
5/16/2019 • 2 minutes to read • Edit Online
This article describes how to enable Azure Active Directory (Azure AD ) B2B collaboration and determine who can
invite guests. By default, all users and guests in your directory can invite guests even if they're not assigned to an
admin role. External collaboration settings let you turn guest invitations on or off for different types of users in
your organization. You can also delegate invitations to individual users by assigning roles that allow them to invite
guests.
NOTE
The External collaboration settings are also available from the Organizational relationships page. In Azure
Active Directory, under Manage, go to Organizational relationships > Settings.
4. On the External collaboration settings page, choose the policies you want to enable.
Guest users permissions are limited: This policy determines permissions for guests in your directory. Select
Yes to block guests from certain directory tasks, like enumerating users, groups, or other directory resources.
Select No to give guests the same access to directory data as regular users in your directory.
Admins and users in the guest inviter role can invite: To allow admins and users in the "Guest Inviter" role
to invite guests, set this policy to Yes.
Members can invite: To allow non-admin members of your directory to invite guests, set this policy to Yes.
Guests can invite: To allow guests to invite other guests, set this policy to Yes.
Enable Email One-Time Passcode for guests (Preview): For more information about the one-time
passcode feature, see Email one-time passcode authentication (preview ).
Collaboration restrictions: For more information about allowing or blocking invitations to specific domains,
see Allow or block invitations to B2B users from specific organizations.
Next steps
See the following articles on Azure AD B2B collaboration:
What is Azure AD B2B collaboration?
Add B2B collaboration guest users without an invitation
Adding a B2B collaboration user to a role
Add Azure Active Directory B2B collaboration users
in the Azure portal
9/16/2019 • 4 minutes to read • Edit Online
As a user who is assigned any of the limited administrator directory roles, you can use the Azure portal to invite
B2B collaboration users. You can invite guest users to the directory, to a group, or to an application. After you
invite a user through any of these methods, the invited user's account is added to Azure Active Directory (Azure
AD ), with a user type of Guest. The guest user must then redeem their invitation to access resources. An
invitation of a user does not expire.
After you add a guest user to the directory, you can either send the guest user a direct link to a shared app, or the
guest user can click the redemption URL in the invitation email. For more information about the redemption
process, see B2B collaboration invitation redemption.
IMPORTANT
You should follow the steps in How-to: Add your organization's privacy info in Azure Active Directory to add the URL of
your organization's privacy statement. As part of the first time invitation redemption process, an invited user must consent
to your privacy terms to continue.
5. Under User name, enter the email address of the external user. Optionally, include a welcome message.
For example:
NOTE
Group email addresses aren’t supported; enter the email address for an individual. Also, some email providers allow
users to add a plus symbol (+) and additional text to their email addresses to help with things like inbox filtering.
However, Azure AD doesn’t currently support plus symbols in email addresses. To avoid delivery issues, omit the
plus symbol and any characters following it up to the @ symbol.
You can also use dynamic groups with Azure AD B2B collaboration. For more information, see Dynamic groups
and Azure Active Directory B2B collaboration.
NOTE
If you resend an invitation that originally directed the user to a specific app, understand that the link in the new invitation
takes the user to the top-level Access Panel instead.
Next steps
To learn how non-Azure AD admins can add B2B guest users, see How do information workers add B2B
collaboration users?
For information about the invitation email, see The elements of the B2B collaboration invitation email.
How users in your organization can invite guest users
to an app
5/16/2019 • 4 minutes to read • Edit Online
After a guest user has been added to the directory in Azure AD, an application owner can send the guest user a
direct link to the app they want to share. Azure AD admins can also set up self-service management for gallery or
SAML -based apps in their Azure AD tenant. This way, application owners can manage their own guest users, even
if the guest users haven’t been added to the directory yet. When an app is configured for self-service, the
application owner uses their Access Panel to invite a guest user to an app or add a guest user to a group that has
access to the app. Self-service app management for gallery and SAML -based apps requires some initial setup by
an admin. The following is a summary of the setup steps (for more detailed instructions, see Prerequisites later on
this page):
Enable self-service group management for your tenant
Create a group to assign to the app and make the user an owner
Configure the app for self-service and assign the group to the app
NOTE
This article describes how to set up self-service management for gallery and SAML-based apps that you’ve added to your
Azure AD tenant. You can also set up self-service Office 365 groups so your users can manage access to their own Office
365 groups. For more ways users can share Office files and apps with guest users, see Guest access in Office 365 groups and
Share SharePoint files or folders.
4. In the Add members search box, type the email address for the guest user. Optionally, include a welcome
message.
5. Select Add to send an invitation to the guest user. After you send the invitation, the user account is
automatically added to the directory as a guest.
4. Under Groups I own, select the group that has access to the app you want to share.
6. In the Add members search box, type the email address for the guest user. Optionally, include a welcome
message.
7. Select Add to automatically send the invitation to the guest user. After you send the invitation, the user
account is automatically added to the directory as a guest.
Prerequisites
Self-service app management requires some initial setup by a Global Administrator and an Azure AD
administrator. As part of this setup, you'll configure the app for self-service and assign a group to the app that the
application owner can manage. You can also configure the group to allow anyone to request membership but
require a group owner's approval. (Learn more about self-service group management.)
NOTE
You cannot add guest users to a dynamic group or to a group that is synced with on-premises Active Directory.
NOTE
For the setting To which group should assigned users be added? select the group you created in the previous
section.
7. Under Manage, select Users and groups, and verify that the self-service group you created appears in the
list.
8. To add the app to the group owner's Access Panel, select Add user > Users and groups. Search for the
group owner and select the user, click Select, and then click Assign to add the user to the app.
Next steps
See the following articles on Azure AD B2B collaboration:
What is Azure AD B2B collaboration?
How do Azure Active Directory admins add B2B collaboration users?
B2B collaboration invitation redemption
Azure AD B2B collaboration licensing
Add Google as an identity provider for B2B guest
users (preview)
6/26/2019 • 4 minutes to read • Edit Online
Google federation is a public preview feature of Azure Active Directory. For more information about previews, see Supplemental
Terms of Use for Microsoft Azure Previews.
By setting up federation with Google, you can allow invited users to sign in to your shared apps and resources with
their own Google accounts, without having to create Microsoft Accounts (MSAs) or Azure AD accounts.
NOTE
Your Google guest users must sign in using a link that includes the tenant context (for example,
https://myapps.microsoft.com/?tenantid=<tenant id> or https://portal.azure.com/<tenant id> , or in the case of a
verified domain, https://myapps.microsoft.com/<verified domain>.onmicrosoft.com ). Direct links to applications and
resources also work as long as they include the tenant context. Guest users are currently unable to sign in using endpoints
that have no tenant context. For example, using https://myapps.microsoft.com , https://portal.azure.com , or the
Teams common endpoint will result in an error.
3. Make sure your new project is selected in the project menu. Then open the menu in the upper left and select
APIs & Services > Credentials.
4. Choose the OAuth consent screen tab and enter an Application name. (Leave the other settings.)
6. Select Save.
7. Choose the Credentials tab. In the Create credentials menu, choose OAuth client ID.
8. Under Application type, choose Web application, and then under Authorized redirect URIs, enter the
following URIs:
https://login.microsoftonline.com
https://login.microsoftonline.com/te/<directory id>/oauth2/authresp
(where <directory id> is your directory ID )
NOTE
To find your directory ID, go to https://portal.azure.com, and under Azure Active Directory, choose
Properties and copy the Directory ID.
9. Select Create. Copy the client ID and client secret, which you'll use when you add the identity provider in
the Azure AD portal.
NOTE
Use the client id and client secret from the app you created in "Step 1: Configure a Google developer project." For
more information, see the New-AzureADMSIdentityProvider article.
NOTE
For more information, see Remove-AzureADMSIdentityProvider.
Email one-time passcode authentication (preview)
5/20/2019 • 6 minutes to read • Edit Online
Email one-time passcode is a public preview feature of Azure Active Directory. For more information about previews, see
Supplemental Terms of Use for Microsoft Azure Previews.
This article describes how to enable Email one-time passcode authentication for B2B guest users. The Email one-
time passcode feature authenticates B2B guest users when they can't be authenticated through other means like
Azure AD, a Microsoft account (MSA), or Google federation. With one-time passcode authentication, there's no
need to create a Microsoft account. When the guest user redeems an invitation or accesses a shared resource, they
can request a temporary code, which is sent to their email address. Then they enter this code to continue signing
in.
This feature is currently available for preview (see Opting in to the preview below ). After preview, this feature will
be turned on by default for all tenants.
NOTE
One-time passcode users must sign in using a link that includes the tenant context (for example,
https://myapps.microsoft.com/?tenantid=<tenant id> or https://portal.azure.com/<tenant id> , or in the case of a
verified domain, https://myapps.microsoft.com/<verified domain>.onmicrosoft.com ). Direct links to applications and
resources also work as long as they include the tenant context. Guest users are currently unable to sign in using endpoints
that have no tenant context. For example, using https://myapps.microsoft.com , https://portal.azure.com , or the
Teams common endpoint will result in an error.
The guest user is now authenticated, and they can see the shared resource or continue signing in.
NOTE
One-time passcodes are valid for 30 minutes. After 30 minutes, that specific one-time passcode is no longer valid, and the
user must request a new one. User sessions expire after 24 hours. After that time, the guest user receives a new passcode
when they access the resource. Session expiration provides added security, especially when a guest user leaves their company
or no longer needs access.
When does a guest user get a one-time passcode?
When a guest user redeems an invitation or uses a link to a resource that has been shared with them, they’ll
receive a one-time passcode if:
They do not have an Azure AD account
They do not have a Microsoft account
The inviting tenant did not set up Google federation for @gmail.com and @googlemail.com users
At the time of invitation, there's no indication that the user you're inviting will use one-time passcode
authentication. But when the guest user signs in, one-time passcode authentication will be the fallback method if
no other authentication methods can be used.
You can view guest users who authenticate with one-time passcodes in the Azure portal by going to Azure Active
Directory > Organizational relationships > Users from other organizations.
NOTE
When a user redeems a one-time passcode and later obtains an MSA, Azure AD account, or other federated account, they'll
continue to be authenticated using a one-time passcode. If you want to update their authentication method, you can delete
their guest user account and reinvite them.
Example
Guest user [email protected] is invited to Fabrikam, which does not have Google federation set up. Alex does
not have a Microsoft account. They'll receive a one-time passcode for authentication.
If the AzureADPreview module displays with no message indicating there’s a later version, you’re set. Otherwise,
based on the output, do one of the following:
If no results are returned, run the following command to install the AzureADPreview module:
Install-Module AzureADPreview
If only the AzureAD module shows up in the results, run the following commands to install the
AzureADPreview module:
Uninstall-Module AzureAD
Install-Module AzureADPreview
If only the AzureADPreview module shows up in the results, but you receive a message that indicates
there's a later version, run the following commands to update the module:
Uninstall-Module AzureADPreview
Install-Module AzureADPreview
You might receive a prompt that you're installing the module from an untrusted repository. This occurs if you
haven't previously set the PSGallery repository as a trusted repository. Press Y to install the module.
Check for existing policies and opt in
Next, check to see if a B2BManagementPolicy currently exists by running the following:
If the output is False, the policy doesn't currently exist. Create a new B2BManagementPolicy and opt in to
the preview by running the following:
$policyValue=@("{`"B2BManagementPolicy`":{`"PreviewPolicy`":{`"Features`":[`"OneTimePasscode`"]}}}")
New-AzureADPolicy -Definition $policyValue -DisplayName B2BManagementPolicy -Type B2BManagementPolicy -
IsOrganizationDefault $true
If the output is True, the B2BManagementPolicy policy currently exists. To update the policy and opt in to
the preview, run the following:
$policy = $currentpolicy.Definition | ConvertFrom-Json
$features=[PSCustomObject]@{'Features'=@('OneTimePasscode')}; $policy.B2BManagementPolicy | Add-Member
'PreviewPolicy' $features -Force; $policy.B2BManagementPolicy
$updatedPolicy = $policy | ConvertTo-Json -Depth 3
Set-AzureADPolicy -Definition $updatedPolicy -Id $currentpolicy.Id
If the output is True, opt out of the preview by running the following:
Direct federation is a public preview feature of Azure Active Directory. For more information about previews, see Supplemental Terms of
Use for Microsoft Azure Previews.
This article describes how to set up direct federation with another organization for B2B collaboration. You can set up
direct federation with any organization whose identity provider (IdP ) supports the SAML 2.0 or WS-Fed protocol. When
you set up direct federation with a partner's IdP, new guest users from that domain can use their own IdP-managed
organizational account to sign in to your Azure AD tenant and start collaborating with you. There's no need for the
guest user to create a separate Azure AD account.
NOTE
Direct federation guest users must sign in using a link that includes the tenant context (for example,
https://myapps.microsoft.com/?tenantid=<tenant id> or https://portal.azure.com/<tenant id> , or in the case of a
verified domain, https://myapps.microsoft.com/\<verified domain>.onmicrosoft.com ). Direct links to applications and
resources also work as long as they include the tenant context. Direct federation users are currently unable to sign in using
common endpoints that have no tenant context. For example, using https://myapps.microsoft.com ,
https://portal.azure.com , or https://teams.microsoft.com will result in an error.
End-user experience
With direct federation, guest users sign into your Azure AD tenant using their own organizational account. When they
are accessing shared resources and are prompted for sign-in, direct federation users are redirected to their IdP. After
successful sign-in, they are returned to Azure AD to access resources. Direct federation users’ refresh tokens are valid
for 12 hours, the default length for passthrough refresh token in Azure AD. If the federated IdP has SSO enabled, the
user will experience SSO and will not see any sign-in prompt after initial authentication.
Limitations
DNS-verified domains in Azure AD
The domain you want to federate with must not be DNS-verified in Azure AD. You're allowed to set up direct federation
with unmanaged (email-verified or "viral") Azure AD tenants because they aren't DNS-verified.
Authentication URL
Direct federation is only allowed for policies where the authentication URL’s domain matches the target domain, or
where the authentication URL is one of these allowed identity providers (this list is subject to change):
accounts.google.com
pingidentity.com
login.pingone.com
okta.com
my.salesforce.com
federation.exostar.com
federation.exostartest.com
For example, when setting up direct federation for fabrikam.com, the authentication URL https://fabrikam.com/adfs
will pass the validation. A host in the same domain will also pass, for example https://sts.fabrikam.com/adfs . However,
the authentication URL https://fabrikamconglomerate.com/adfs or https://fabrikam.com.uk/adfs for the same domain
won't pass.
Signing certificate renewal
If you specify the metadata URL in the identity provider settings, Azure AD will automatically renew the signing
certificate when it expires. However, if the certificate is rotated for any reason before the expiration time, or if you don't
provide a metadata URL, Azure AD will be unable to renew it. In this case, you'll need to update the signing certificate
manually.
Limit on federation relationships
Currently, a maximum of 1,000 federation relationships is supported. This limit includes both internal federations and
direct federations.
NOTE
To illustrate how to configure an identity provider for direct federation, we’ll use Active Directory Federation Services (AD FS) as an
example. See the article Configure direct federation with AD FS, which gives examples of how to configure AD FS as a SAML 2.0 or
WS-Fed identity provider in preparation for direct federation.
NOTE
NOTE The target domain for direct federation must not be DNS-verified on Azure AD. The authentication URL domain must match
the target domain or it must be the domain of an allowed identity provider. See the Limitations section for details.
ATTRIBUTE VALUE
AssertionConsumerService https://login.microsoftonline.com/login.srf
Audience urn:federation:MicrosoftOnline
Required claims for the SAML 2.0 token issued by the IdP:
ATTRIBUTE VALUE
emailaddress http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
WS-Fed configuration
Azure AD B2B can be configured to federate with identity providers that use the WS-Fed protocol with some specific
requirements as listed below. Currently, the two WS-Fed providers have been tested for compatibility with Azure AD
include AD FS and Shibboleth. For more information about establishing a relying party trust between a WS-Fed
compliant provider with Azure AD, see the "STS Integration Paper using WS Protocols" available in the Azure AD
Identity Provider Compatibility Docs.
NOTE
The target domain for direct federation must not be DNS-verified on Azure AD. The authentication URL domain must match either
the target domain or the domain of an allowed identity provider. See the Limitations section for details.
ATTRIBUTE VALUE
PassiveRequestorEndpoint https://login.microsoftonline.com/login.srf
Audience urn:federation:MicrosoftOnline
ATTRIBUTE VALUE
ImmutableID http://schemas.microsoft.com/LiveID/Federation/2008/05/ImmutableID
emailaddress http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
5. Enter your partner organization’s domain name, which will be the target domain name for direct federation
6. You can upload a metadata file to populate metadata details. If you choose to input metadata manually, enter the
following information:
Domain name of partner IdP
Entity ID of partner IdP
Passive requestor endpoint of partner IdP
Certificate
NOTE
Metadata URL is optional, however we strongly recommend it. If you provide the metadata URL, Azure AD can
automatically renew the signing certificate when it expires. If the certificate is rotated for any reason before the expiration
time or if you do not provide a metadata URL, Azure AD will be unable to renew it. In this case, you'll need to update the
signing certificate manually.
7. Select Save.
To configure direct federation in Azure AD using PowerShell
1. Install the latest version of the Azure AD PowerShell for Graph module (AzureADPreview ). (If you need detailed
steps, the quickstart for adding a guest user includes the section Install the latest AzureADPreview module.)
2. Run the following command:
Connect-AzureAD
3. At the sign-in prompt, sign in with the managed Global Administrator account.
4. Run the following commands, replacing the values from the federation metadata file. For AD FS Server and Okta,
the federation file is federationmetadata.xml, for example:
https://sts.totheclouddemo.com/federationmetadata/2007-06/federationmetadata.xml .
Connect-AzureAD
3. At the sign-in prompt, sign in with the managed Global Administrator account.
4. Enter the following command:
Direct federation is a public preview feature of Azure Active Directory. For more information about previews, see Supplemental Terms of
Use for Microsoft Azure Previews.
This article describes how to set up direct federation using Active Directory Federation Services (AD FS ) as either a
SAML 2.0 or WS-Fed identity provider. To support direct federation, certain attributes and claims must be configured at
the identity provider. To illustrate how to configure an identity provider for direct federation, we’ll use Active Directory
Federation Services (AD FS ) as an example. We’ll show how to set up AD FS both as a SAML identity provider and as a
WS-Fed identity provider.
NOTE
This article describes how to set up AD FS for both SAML and WS-Fed for illustration purposes. For direct federation integrations
where the identity provider is AD FS, we recommend using WS-Fed as the protocol.
ATTRIBUTE VALUE
AssertionConsumerService https://login.microsoftonline.com/login.srf
Audience urn:federation:MicrosoftOnline
The following claims need to be configured in the SAML 2.0 token issued by the identity provider:
ATTRIBUTE VALUE
emailaddress http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
The next section illustrates how to configure the required attributes and claims using AD FS as an example of a SAML
2.0 identity provider.
Before you begin
An AD FS server must already be set up and functioning before you begin this procedure. For help with setting up an
AD FS server, see Create a test AD FS 3.0 instance on an Azure virtual machine.
Add the claim description
1. On your AD FS server, select Tools > AD FS management.
2. In the navigation pane, select Service > Claim Descriptions.
3. Under Actions, select Add Claim Description.
4. In the Add a Claim Description window, specify the following values:
Display Name: Persistent Identifier
Claim identifier: urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
Select the check box for Publish this claim description in federation metadata as a claim type that this
federation service can accept.
Select the check box for Publish this claim description in federation metadata as a claim type that this
federation service can send.
5. Click Ok.
Add the relying party trust and claim rules
1. On the AD FS server, go to Tools > AD FS management.
2. In the navigation pane, select Trust Relationships > Relying Party Trusts.
3. Under Actions, select Add Relying Party Trust.
4. In the add relying party trust wizard for Select Data Source, use the option Import data about the relying
party published online or on a local network. Specify this federation metadata URL-
https://nexus.microsoftonline-p.com/federationmetadata/saml20/federationmetadata.xml. Leave other default
selections. Select Close.
5. The Edit Claim Rules wizard opens.
6. In the Edit Claim Rules wizard, select Add Rule. In Choose Rule Type, select Send LDAP Attributes as
Claims. Select Next.
7. In Configure Claim Rule, specify the following values:
Claim rule name: Email claim rule
Attribute store: Active Directory
LDAP Attribute: E-Mail-Addresses
Outgoing Claim Type: E-Mail Address
8. Select Finish.
9. The Edit Claim Rules window will show the new rule. Click Apply.
10. Click Ok.
Create an email transform rule
1. Go to Edit Claim Rules and click Add Rule. In Choose Rule Type, select Transform an Incoming Claim and
click Next.
2. In Configure Claim Rule, specify the following values:
Claim rule name: Email transform rule
Incoming claim type: E-mail Address
Outgoing claim type: Name ID
Outgoing name ID format: Persistent Identifier
Select Pass through all claim values.
3. Click Finish.
4. The Edit Claim Rules window will show the new rules. Click Apply.
5. Click OK. The AD FS server is now configured for direct federation using the SAML 2.0 protocol.
ATTRIBUTE VALUE
PassiveRequestorEndpoint https://login.microsoftonline.com/login.srf
Audience urn:federation:MicrosoftOnline
ATTRIBUTE VALUE
ImmutableID http://schemas.microsoft.com/LiveID/Federation/2008/05/ImmutableID
emailaddress http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
The next section illustrates how to configure the required attributes and claims using AD FS as an example of a WS-Fed
identity provider.
Before you begin
An AD FS server must already be set up and functioning before you begin this procedure. For help with setting up an
AD FS server, see Create a test AD FS 3.0 instance on an Azure virtual machine.
Add the relying party trust and claim rules
1. On the AD FS server, go to Tools > AD FS management.
2. In the navigation pane, select Trust Relationships > Relying Party Trusts.
3. Under Actions, select Add Relying Party Trust.
4. In the add relying party trust wizard, for Select Data Source, use the option Import data about the relying
party published online or on a local network. Specify this federation metadata URL:
https://nexus.microsoftonline-p.com/federationmetadata/2007-06/federationmetadata.xml . Leave other default
selections. Select Close.
5. The Edit Claim Rules wizard opens.
6. In the Edit Claim Rules wizard, select Add Rule. In Choose Rule Type, select Send Claims Using a Custom
Rule. Select Next.
7. In Configure Claim Rule, specify the following values:
Claim rule name: Issue Immutable Id
Custom rule:
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname"] => issue(store =
"Active Directory", types = ("http://schemas.microsoft.com/LiveID/Federation/2008/05/ImmutableID"), query =
"samAccountName={0};objectGUID;{1}", param = regexreplace(c.Value, "(?<domain>[^\\]+)\\(?<user>.+)",
"${user}"), param = c.Value);
8. Select Finish.
9. The Edit Claim Rules window will show the new rule. Click Apply.
10. In the same Edit Claim Rules wizard, select Add Rule. In Cohose Rule Type, select Send LDAP Attributes as
Claims. Select Next.
11. In Configure Claim Rule, specify the following values:
Claim rule name: Email claim rule
Attribute store: Active Directory
LDAP Attribute: E-Mail-Addresses
Outgoing Claim Type: E-Mail Address
12. Select Finish.
13. The Edit Claim Rules window will show the new rule. Click Apply.
14. Click OK. The AD FS server is now configured for direct federation using WS-Fed.
Next steps
Next, you'll configure direct federation in Azure AD either in the Azure AD portal or by using PowerShell.
Allow or block invitations to B2B users from specific
organizations
7/16/2019 • 5 minutes to read • Edit Online
You can use an allow list or a deny list to allow or block invitations to B2B users from specific organizations. For
example, if you want to block personal email address domains, you can set up a deny list that contains domains like
Gmail.com and Outlook.com. Or, if your business has a partnership with other businesses like Contoso.com,
Fabrikam.com, and Litware.com, and you want to restrict invitations to only these organizations, you can add
Contoso.com, Fabrikam.com, and Litware.com to your allow list.
Important considerations
You can create either an allow list or a deny list. You can't set up both types of lists. By default, whatever
domains are not in the allow list are on the deny list, and vice versa.
You can create only one policy per organization. You can update the policy to include more domains, or you can
delete the policy to create a new one.
The number of domains you can add to an allow list or deny list is limited only by the size of the policy. The
maximum size of the entire policy is 25 KB (25,000 characters), which includes the allow list or deny list and any
other parameters configured for other features.
This list works independently from OneDrive for Business and SharePoint Online allow/block lists. If you want
to restrict individual file sharing in SharePoint Online, you need to set up an allow or deny list for OneDrive for
Business and SharePoint Online. For more information, see Restricted domains sharing in SharePoint Online
and OneDrive for Business.
The list does not apply to external users who have already redeemed the invitation. The list will be enforced
after the list is set up. If a user invitation is in a pending state, and you set a policy that blocks their domain, the
user's attempt to redeem the invitation will fail.
If the module is not installed, or you don't have a required version, do one of the following:
If no results are returned, run the following command to install the latest version of
theAzureADPreviewmodule:
Install-Module AzureADPreview
Uninstall-Module AzureAD
Install-Module AzureADPreview
IfonlytheAzureADPreviewmodule is shown in the results, but the version is less than2.0.0.98, run the
following commands to update it:
Uninstall-Module AzureADPreview
Install-Module AzureADPreview
Uninstall-Module AzureAD
Uninstall-Module AzureADPreview
Install-Module AzureADPreview
The following shows the same example, but with the policy definition inline.
To set the allow or deny list policy, use the Set-AzureADPolicy cmdlet. For example:
Next steps
For an overview of Azure AD B2B, see What is Azure AD B2B collaboration?
For information about Conditional Access and B2B collaboration, see Conditional Access for B2B collaboration
users.
Add B2B collaboration guest users without an
invitation link or email
6/12/2019 • 2 minutes to read • Edit Online
You can now invite guest users by sending out a direct link to a shared app. With this method, guest users no
longer need to use the invitation email, except in some special cases. A guest user clicks the app link, reviews and
accepts the privacy terms, and then seamlessly accesses the app. For more information, see B2B collaboration
invitation redemption.
Before this new method was available, you could invite guest users without requiring the invitation email by
adding an inviter (from your organization or from a partner organization) to the Guest inviter directory role, and
then having the inviter add guest users to the directory, groups, or applications through the UI or through
PowerShell. (If using PowerShell, you can suppress the invitation email altogether). For example:
1. A user in the host organization (for example, WoodGrove) invites one user from the partner organization (for
example, [email protected]) as Guest.
2. The administrator in the host organization sets up policies that allow Sam to identify and add other users from
the partner organization (Litware). (Sam must be added to the Guest inviter role.)
3. Now, Sam can add other users from Litware to the WoodGrove directory, groups, or applications without
needing invitations to be redeemed. If Sam has the appropriate enumeration privileges in Litware, it happens
automatically.
This original method still works. However, there's a small difference in behavior. If you use PowerShell, you'll
notice that an invited guest account now has a PendingAcceptance status instead of immediately showing
Accepted. Although the status is pending, the guest user can still sign in and access the app without clicking an
email invitation link. The pending status means that the user has not yet gone through the consent experience,
where they accept the privacy terms of the inviting organization. The guest user sees this consent screen when
they sign in for the first time.
If you invite a user to the directory, the guest user must access the resource tenant-specific Azure portal URL
directly (such as https://portal.azure.com/*resourcetenant*.onmicrosoft.com) to view and agree to the privacy
terms.
Next steps
What is Azure AD B2B collaboration?
B2B collaboration invitation redemption
Delegate invitations for Azure Active Directory B2B collaboration
How do information workers add B2B collaboration users?
Azure Active Directory B2B collaboration API and
customization
5/16/2019 • 2 minutes to read • Edit Online
We've had many customers tell us that they want to customize the invitation process in a way that works best for
their organizations. With our API, you can do just that. https://developer.microsoft.com/graph/docs/api-
reference/v1.0/resources/invitation
"invitedUserDisplayName": "Sam"
"invitedUserEmailAddress": "[email protected]"
2. Customize where you want your users to land after they accept their invitation.
"inviteRedirectUrl": "https://myapps.microsoft.com/"
"sendInvitationMessage": true
4. And choose to cc: people you want to keep in the loop about your inviting this collaborator.
5. Or completely customize your invitation and onboarding workflow by choosing not to send notifications
through Azure AD.
"sendInvitationMessage": false
In this case, you get back a redemption URL from the API that you can embed in an email template, IM, or
other distribution method of your choice.
6. Finally, if you are an admin, you can choose to invite the user as member.
"invitedUserType": "Member"
Authorization model
The API can be run in the following authorization modes:
App + User mode
In this mode, whoever is using the API needs to have the permissions to be create B2B invitations.
App only mode
In app only context, the app needs the User.Invite.All scope for the invitation to succeed.
For more information, refer to: https://developer.microsoft.com/graph/docs/authorization/permission_scopes
PowerShell
You can use PowerShell to add and invite external users to an organization easily. Create an invitation using the
cmdlet:
New-AzureADMSInvitation
NOTE
Make sure you have the latest version of the AzureAD PowerShell module or AzureADPreview PowerShell module.
See also
Check out the invitation API reference in https://developer.microsoft.com/graph/docs/api-
reference/v1.0/resources/invitation.
Next steps
What is Azure AD B2B collaboration?
The elements of the B2B collaboration invitation email
B2B collaboration invitation redemption
Add B2B collaboration users without an invitation
Grant permissions to users from partner
organizations in your Azure Active Directory tenant
5/16/2019 • 2 minutes to read • Edit Online
Azure Active Directory (Azure AD ) B2B collaboration users are added as guest users to the directory, and guest
permissions in the directory are restricted by default. Your business may need some guest users to fill higher-
privilege roles in your organization. To support defining higher-privilege roles, guest users can be added to any
roles you desire, based on your organization's needs.
Default role
Next steps
B2B collaboration user properties
Adding a B2B collaboration user to a role
Conditional Access for B2B collaboration users
Properties of an Azure Active Directory B2B
collaboration user
5/16/2019 • 5 minutes to read • Edit Online
This article describes the properties and states of the B2B guest user object in Azure Active Directory (Azure AD )
before and after invitation redemption. An Azure AD business-to-business (B2B ) collaboration user is a user with
UserType = Guest. This guest user typically is from a partner organization and has limited privileges in the
inviting directory, by default.
Depending on the inviting organization's needs, an Azure AD B2B collaboration user can be in one of the
following account states:
State 1: Homed in an external instance of Azure AD and represented as a guest user in the inviting
organization. In this case, the B2B user signs in by using an Azure AD account that belongs to the invited
tenant. If the partner organization doesn't use Azure AD, the guest user in Azure AD is still created. The
requirements are that they redeem their invitation and Azure AD verifies their email address. This
arrangement is also called a just-in-time (JIT) tenancy or a "viral" tenancy.
State 2: Homed in a Microsoft or other account and represented as a guest user in the host organization.
In this case, the guest user signs in with a Microsoft account or a social account (google.com or similar).
The invited user's identity is created as a Microsoft account in the inviting organization’s directory during
offer redemption.
State 3: Homed in the host organization's on-premises Active Directory and synced with the host
organization's Azure AD. You can use Azure AD Connect to sync the partner accounts to the cloud as
Azure AD B2B users with UserType = Guest. See Grant locally-managed partner accounts access to cloud
resources.
State 4: Homed in the host organization's Azure AD with UserType = Guest and credentials that the host
organization manages.
Now, let's see what an Azure AD B2B collaboration user looks like in Azure AD.
Before invitation redemption
State 1 and State 2 accounts are the result of inviting guest users to collaborate by using the guest users' own
credentials. When the invitation is initially sent to the guest user, an account is created in your directory. This
account doesn’t have any credentials associated with it because authentication is performed by the guest user's
identity provider. The Source property for the guest user account in your directory is set to Invited user.
For guest users in State 3 and State 4, the Source property is set to Azure Active Directory or Windows
Server Active Directory, as described in the next section.
Key properties of the Azure AD B2B collaboration user
UserType
This property indicates the relationship of the user to the host tenancy. This property can have two values:
Member: This value indicates an employee of the host organization and a user in the organization's
payroll. For example, this user expects to have access to internal-only sites. This user is not considered an
external collaborator.
Guest: This value indicates a user who isn't considered internal to the company, such as an external
collaborator, partner, or customer. Such a user isn't expected to receive a CEO's internal memo or receive
company benefits, for example.
NOTE
The UserType has no relation to how the user signs in, the directory role of the user, and so on. This property
simply indicates the user's relationship to the host organization and allows the organization to enforce policies that
depend on this property.
Source
This property indicates how the user signs in.
Invited User: This user has been invited but has not yet redeemed an invitation.
External Active Directory: This user is homed in an external organization and authenticates by using an
Azure AD account that belongs to the other organization. This type of sign-in corresponds to State 1.
Microsoft account: This user is homed in a Microsoft account and authenticates by using a Microsoft
account. This type of sign-in corresponds to State 2.
Windows Server Active Directory: This user is signed in from on-premises Active Directory that belongs
to this organization. This type of sign-in corresponds to State 3.
Azure Active Directory: This user authenticates by using an Azure AD account that belongs to this
organization. This type of sign-in corresponds to State 4.
NOTE
Source and UserType are independent properties. A value of Source does not imply a particular value for UserType.
Next steps
What is Azure AD B2B collaboration?
B2B collaboration user tokens
B2B collaboration user claims mapping
Configure SaaS apps for B2B collaboration
5/16/2019 • 2 minutes to read • Edit Online
Azure Active Directory (Azure AD ) B2B collaboration works with most apps that integrate with Azure AD. In this
section, we walk through instructions for configuring some popular SaaS apps for use with Azure AD B2B.
Before you look at app-specific instructions, here are some rules of thumb:
For most of the apps, user setup needs to happen manually. That is, users must be created manually in the
app as well.
For apps that support automatic setup, such as Dropbox, separate invitations are created from the apps.
Users must be sure to accept each invitation.
In the user attributes, to mitigate any issues with mangled user profile disk (UPD ) in guest users, always set
User Identifier to user.mail.
Dropbox Business
To enable users to sign in using their organization account, you must manually configure Dropbox Business to use
Azure AD as a Security Assertion Markup Language (SAML ) identity provider. If Dropbox Business has not been
configured to do so, it cannot prompt or otherwise allow users to sign in using Azure AD.
1. To add the Dropbox Business app into Azure AD, select Enterprise applications in the left pane, and then
click Add.
2. In the Add an application window, enter dropbox in the search box, and then select Dropbox for
Business in the results list.
3. On the Single sign-on page, select Single sign-on in the left pane, and then enter user.mail in the User
Identifier box. (It's set as UPN by default.)
4. To download the certificate to use for Dropbox configuration, select Configure DropBox, and then select
SAML Single Sign On Service URL in the list.
5. Sign in to Dropbox with the sign-on URL from the Single sign-on page.
7. In the Authentication dialog box, select More, upload the certificate and then, in the Sign in URL box,
enter the SAML single sign-on URL.
8. To configure automatic user setup in the Azure portal, select Provisioning in the left pane, select
Automatic in the Provisioning Mode box, and then select Authorize.
After guest or member users have been set up in the Dropbox app, they receive a separate invitation from
Dropbox. To use Dropbox single sign-on, invitees must accept the invitation by clicking a link in it.
Box
You can enable users to authenticate Box guest users with their Azure AD account by using federation that's based
on the SAML protocol. In this procedure, you upload metadata to Box.com.
1. Add the Box app from the enterprise apps.
2. Configure single sign-on in the following order:
a. In the Sign on URL box, ensure that the sign-on URL is set appropriately for Box in the Azure portal. This
URL is the URL of your Box.com tenant. It should follow the naming convention https://.box.com.
The Identifier does not apply to this app, but it still appears as a mandatory field.
b. In the User identifier box, enter user.mail (for SSO for guest accounts).
c. Under SAML Signing Certificate, click Create new certificate.
d. To begin configuring your Box.com tenant to use Azure AD as an identity provider, download the
metadata file and then save it to your local drive.
e. Forward the metadata file to the Box support team, which configures single sign-on for you.
3. For Azure AD automatic user setup, in the left pane, select Provisioning, and then select Authorize.
Like Dropbox invitees, Box invitees must redeem their invitation from the Box app.
Next steps
See the following articles on Azure AD B2B collaboration:
What is Azure AD B2B collaboration?
Dynamic groups and B2B collaboration
B2B collaboration user claims mapping
Office 365 external sharing
Grant locally-managed partner accounts access to
cloud resources using Azure AD B2B collaboration
5/16/2019 • 2 minutes to read • Edit Online
Before Azure Active Directory (Azure AD ), organizations with on-premises identity systems have traditionally
managed partner accounts in their on-premises directory. In such an organization, when you start to move apps
to Azure AD, you want to make sure your partners can access the resources they need. It shouldn't matter
whether the resources are on-premises or in the cloud. Also, you want your partner users to be able to use the
same sign-in credentials for both on-premises and Azure AD resources.
If you create accounts for your external partners in your on-premises directory (for example, you create an
account with a sign-in name of "wmoran" for an external user named Wendy Moran in your partners.contoso.com
domain), you can now sync these accounts to the cloud. Specifically, you can use Azure AD Connect to sync the
partner accounts to the cloud as Azure AD B2B users (that is, users with UserType = Guest). This enables your
partner users to access cloud resources using the same credentials as their local accounts, without giving them
more access than they need.
Next steps
Azure Active Directory B2B collaboration for hybrid organizations
Grant B2B users in Azure AD access to your on-premises applications
For an overview of Azure AD Connect, see Integrate your on-premises directories with Azure Active Directory.
Grant B2B users in Azure AD access to your on-
premises applications
6/13/2019 • 4 minutes to read • Edit Online
As an organization that uses Azure Active Directory (Azure AD ) B2B collaboration capabilities to invite guest users
from partner organizations to your Azure AD, you can now provide these B2B users access to on-premises apps.
These on-premises apps can use SAML -based authentication or Integrated Windows Authentication (IWA) with
Kerberos constrained delegation (KCD ).
1. A user from a partner organization (the Fabrikam tenant) is invited to the Contoso tenant.
2. A guest user object is created in the Contoso tenant (for example, a user object with a UPN of
guest_fabrikam.com#EXT#@contoso.onmicrosoft.com).
3. The Fabrikam guest is imported from Contoso through MIM or through the B2B PowerShell script.
4. A representation or “footprint” of the Fabrikam guest user object (Guest#EXT#) is created in the on-premises
directory, Contoso.com, through MIM or through the B2B PowerShell script.
5. The guest user accesses the on-premises application, app.contoso.com.
6. The authentication request is authorized through Application Proxy, using Kerberos constrained delegation.
7. Because the guest user object exists locally, the authentication is successful.
Lifecycle management policies
You can manage the on-premises B2B user objects through lifecycle management policies. For example:
You can set up multi-factor authentication (MFA) policies for the Guest user so that MFA is used during
Application Proxy authentication. For more information, see Conditional Access for B2B collaboration users.
Any sponsorships, access reviews, account verifications, etc. that are performed on the cloud B2B user applies
to the on-premises users. For example, if the cloud user is deleted through your lifecycle management policies,
the on-premises user is also deleted by MIM Sync or through Azure AD Connect sync. For more information,
see Manage guest access with Azure AD access reviews.
Create B2B guest user objects through MIM
For information about how to use MIM 2016 Service Pack 1 and the MIM management agent for Microsoft
Graph to create the guest user objects in the on-premises directory, see Azure AD business-to-business (B2B )
collaboration with Microsoft Identity Manager (MIM ) 2016 SP1 with Azure Application Proxy.
Create B2B guest user objects through a script (Preview)
There’s a PowerShell sample script available that you can use as a starting point to create the guest user objects in
your on-premises Active Directory.
You can download the script and the Readme file from the Download Center. Choose the Script and Readme to
pull Azure AD B2B users on-prem.zip file.
Before you use the script, make sure that you review the prerequisites and important considerations in the
associated Readme file. Also, understand that the script is made available only as a sample. Your development
team or a partner must customize and review the script before you run it.
License considerations
Make sure that you have the correct Client Access Licenses (CALs) for external guest users who access on-
premises apps. For more information, see the "External Connectors" section of Client Access Licenses and
Management Licenses. Consult your Microsoft representative or local reseller regarding your specific licensing
needs.
Next steps
Azure Active Directory B2B collaboration for hybrid organizations
For an overview of Azure AD Connect, see Integrate your on-premises directories with Azure Active
Directory.
Leave an organization as a guest user
6/13/2019 • 2 minutes to read • Edit Online
An Azure Active Directory (Azure AD ) B2B guest user can decide to leave an organization at any time if they no
longer need to use apps from that organization or maintain any association. A user can leave an organization on
their own, without having to contact an administrator.
NOTE
A guest user can't leave an organization if their account is disabled in either the home tenant or the resource tenant. If their
account is disabled, the guest user will need to contact the tenant admin, who can either delete the guest account or enable
the guest account so the user can leave the organization.
Leave an organization
To leave an organization, follow these steps.
1. Go to your Access Panel Profile page by doing one of the following steps:
In the Azure portal, click your name in the upper right and select View account.
Open your Access Panel, click your name in the upper right, and next to Organizations, select the
settings icon (gear).
NOTE
If you’re not already signed in to the organization you want to leave, under Organizations, click the Sign in to
leave organization link next to the organization’s name. After you’re signed in, click your name again in the upper
right and next to Organizations, select the settings icon (gear).
2. Under Organizations, find the organization that you want to leave, and select Leave organization.
3. When asked to confirm, select Leave.
Account removal
When a user leaves an organization, the user account is "soft deleted" in the directory. By default, the user object
moves to the Deleted users area in Azure AD but isn't permanently deleted for 30 days. This soft deletion enables
the administrator to restore the user account (including groups and permissions), if the user makes a request to
restore the account within the 30-day period.
If desired, a tenant administrator can permanently delete the account at any time during the 30-day period. To do
this:
1. In the Azure portal, select Azure Active Directory.
2. Under Manage, select Users.
3. Select Deleted users.
4. Select the check box next to a deleted user, and then select Delete permanently.
If you permanently delete a user, this action is irrevocable.
NOTE
For information about viewing or deleting personal data, see Azure Data Subject Requests for the GDPR. For more
information about GDPR, see the GDPR section of the Service Trust portal.
Next steps
For an overview of Azure AD B2B, see What is Azure AD B2B collaboration?
Auditing and reporting a B2B collaboration user
5/16/2019 • 2 minutes to read • Edit Online
With guest users, you have auditing capabilities similar to with member users.
Access reviews
You can use access reviews to periodically verify whether guest users still need access to your resources. The
Access reviews feature is available in Azure Active Directory under Manage > Organizational
Relationships. (You can also search for "access reviews" from All services in the Azure portal.) To learn how to
use access reviews, see Manage guest access with Azure AD access reviews.
Audit logs
The Azure AD audit logs provide records of system and user activities, including activities initiated by guest users.
To access audit logs, in Azure Active Directory, under Monitoring, select Audit logs. Here's an example of the
invitation and redemption history of invitee Sam Oogle:
You can dive into each of these events to get the details. For example, let's look at the acceptance details.
You can also export these logs from Azure AD and use the reporting tool of your choice to get customized reports.
Next steps
B2B collaboration user properties
Troubleshooting Azure Active Directory B2B
collaboration
9/13/2019 • 4 minutes to read • Edit Online
Here are some remedies for common problems with Azure Active Directory (Azure AD ) B2B collaboration.
I’ve added an external user but do not see them in my Global Address
Book or in the people picker
In cases where external users are not populated in the list, the object might take a few minutes to replicate.
If you have recently modified these settings or assigned the Guest Inviter role to a user, there might be a 15-60
minute delay before the changes take effect.
How does ‘#’, which is not normally a valid character, sync with Azure
AD?
“#” is a reserved character in UPNs for Azure AD B2B collaboration or external users, because the invited account
[email protected] becomes user_contoso.com#EXT#@fabrikam.onmicrosoft.com. Therefore, # in UPNs coming
from on-premises aren't allowed to sign in to the Azure portal.
I notice that the custom message does not get included with invitation
messages at times
To comply with privacy laws, our APIs do not include custom messages in the email invitation when:
The inviter doesn’t have an email address in the inviting tenant
When an appservice principal sends the invitation
If this scenario is important to you, you can suppress our API invitation email, and send it through the email
mechanism of your choice. Consult your organization’s legal counsel to make sure any email you send this way
also complies with privacy laws.
AADSTS65005: Using application 'AppName' is currently not supported for your organization contoso.com because
it is in an unmanaged state. An administrator needs to claim ownership of the company by DNS validation of
contoso.com before the application AppName can be provisioned.
The user has an Azure user account and is a viral tenant who has been abandoned or unmanaged. Additionally,
there are no global or company administrators in the tenant.
To resolve this problem, you must take over the abandoned tenant. Refer to Take over an unmanaged directory as
administrator in Azure Active Directory. You must also access the internet-facing DNS for the domain suffix in
question in order to provide direct evidence that you are in control of the namespace. After the tenant is returned
to a managed state, please discuss with the customer whether leaving the users and verified domain name is the
best option for their organization.
Next steps
Get support for B2B collaboration
Azure Active Directory B2B collaboration API and
customization
5/16/2019 • 2 minutes to read • Edit Online
We've had many customers tell us that they want to customize the invitation process in a way that works best for
their organizations. With our API, you can do just that. https://developer.microsoft.com/graph/docs/api-
reference/v1.0/resources/invitation
"invitedUserDisplayName": "Sam"
"invitedUserEmailAddress": "[email protected]"
2. Customize where you want your users to land after they accept their invitation.
"inviteRedirectUrl": "https://myapps.microsoft.com/"
"sendInvitationMessage": true
4. And choose to cc: people you want to keep in the loop about your inviting this collaborator.
5. Or completely customize your invitation and onboarding workflow by choosing not to send notifications
through Azure AD.
"sendInvitationMessage": false
In this case, you get back a redemption URL from the API that you can embed in an email template, IM, or
other distribution method of your choice.
6. Finally, if you are an admin, you can choose to invite the user as member.
"invitedUserType": "Member"
Authorization model
The API can be run in the following authorization modes:
App + User mode
In this mode, whoever is using the API needs to have the permissions to be create B2B invitations.
App only mode
In app only context, the app needs the User.Invite.All scope for the invitation to succeed.
For more information, refer to: https://developer.microsoft.com/graph/docs/authorization/permission_scopes
PowerShell
You can use PowerShell to add and invite external users to an organization easily. Create an invitation using the
cmdlet:
New-AzureADMSInvitation
NOTE
Make sure you have the latest version of the AzureAD PowerShell module or AzureADPreview PowerShell module.
See also
Check out the invitation API reference in https://developer.microsoft.com/graph/docs/api-
reference/v1.0/resources/invitation.
Next steps
What is Azure AD B2B collaboration?
The elements of the B2B collaboration invitation email
B2B collaboration invitation redemption
Add B2B collaboration users without an invitation
Azure Active Directory B2B collaboration FAQs
6/20/2019 • 8 minutes to read • Edit Online
These frequently asked questions (FAQs) about Azure Active Directory (Azure AD ) business-to-business (B2B )
collaboration are periodically updated to include new topics.
Can we customize our sign-in page so it's more intuitive for our B2B collaboration guest users?
Absolutely! See our blog post about this feature. For more information about how to customize your
organization's sign-in page, see Add company branding to sign in and Access Panel pages.
Can B2B collaboration users access SharePoint Online and OneDrive?
Yes. However, the ability to search for existing guest users in SharePoint Online by using the people picker is Off
by default. To turn on the option to search for existing guest users, set
ShowPeoplePickerSuggestionsForGuestUsers to On. You can turn this setting on either at the tenant level or
at the site collection level. You can change this setting by using the Set-SPOTenant and Set-SPOSite cmdlets. With
these cmdlets, members can search all existing guest users in the directory. Changes in the tenant scope don't
affect SharePoint Online sites that have already been provisioned.
Is the CSV upload feature still supported?
Yes. For more information about using the .csv file upload feature, see this PowerShell sample.
How can I customize my invitation emails?
You can customize almost everything about the inviter process by using the B2B invitation APIs.
Can guest users reset their multi-factor authentication method?
Yes. Guest users can reset their multi-factor authentication method the same way that regular users do.
Which organization is responsible for multi-factor authentication licenses?
The inviting organization performs multi-factor authentication. The inviting organization must make sure that the
organization has enough licenses for their B2B users who are using multi-factor authentication.
What if a partner organization already has multi-factor authentication set up? Can we trust their multi-factor
authentication, and not use our own multi-factor authentication?
This feature is currently not supported. If access to your organization's resources requires multi-factor
authentication, the partner organization will need to register for multi-factor authentication in your (the inviting)
organization.
How can I use delayed invitations?
An organization might want to add B2B collaboration users, provision them to applications as needed, and then
send invitations. You can use the B2B collaboration invitation API to customize the onboarding workflow.
Can I make guest users visible in the Exchange Global Address List?
Yes. Guest objects aren't visible in your organization's global address list (GAL ) by default, but you can use Azure
Active Directory PowerShell to make them visible. See Can I make guest objects visible in the global address list?
Can I make a guest user a limited administrator?
Absolutely. For more information, see Adding guest users to a role.
Does Azure AD B2B collaboration allow B2B users to access the Azure portal?
Unless a user is assigned the role of limited administrator, B2B collaboration users won't require access to the
Azure portal. However, B2B collaboration users who are assigned the role of limited administrator can access the
portal. Also, if a guest user who isn't assigned one of these admin roles accesses the portal, the user might be able
to access certain parts of the experience. The guest user role has some permissions in the directory.
Can I block access to the Azure portal for guest users?
Yes! When you configure this policy, be careful to avoid accidentally blocking access to members and admins. To
block a guest user's access to the Azure portal, use a Conditional Access policy in the Windows Azure classic
deployment model API:
1. Modify the All Users group so that it contains only members.
3. Set up a Conditional Access policy to block guest users from accessing the portal, as shown in the following
video:
Does Azure AD B2B collaboration support multi-factor authentication and consumer email accounts?
Yes. Multi-factor authentication and consumer email accounts are both supported for Azure AD B2B collaboration.
Do you support password reset for Azure AD B2B collaboration users?
If your Azure AD tenant is the home directory for a user, you can reset the user's password from the Azure portal.
But you can't directly reset a password for a guest user who signs in with an account that's managed by another
Azure AD directory or external identity provider. Only the guest user or an administrator in the user’s home
directory can reset the password. Here are some examples of how password reset works for guest users:
Guest users who sign in with a Microsoft account (for example [email protected]) can reset their own
passwords using Microsoft account self-service password reset (SSPR ). See How to reset your Microsoft
account password.
Guest users who sign in with a Google account or another external identity provider can reset their own
passwords using their identity provider’s SSPR method. For example, a guest user with the Google account
[email protected] can reset their password by following the instructions in Change or reset your
password.
If the identity tenant is a just-in-time (JIT) or "viral" tenant (meaning it's a separate, unmanaged Azure tenant),
only the guest user can reset their password. Sometimes an organization will take over management of viral
tenants that are created when employees use their work email addresses to sign up for services. After the
organization takes over a viral tenant, only an administrator in that organization can reset the user's password
or enable SSPR. If necessary, as the inviting organization, you can remove the guest user account from your
directory and resend an invitation.
If the guest user's home directory is your Azure AD tenant, you can reset the user's password. For example,
you might have created a user or synced a user from your on-premises Active Directory and set their UserType
to Guest. Because this user is homed in your directory, you can reset their password from the Azure portal.
Does Microsoft Dynamics 365 provide online support for Azure AD B2B collaboration?
Yes, Dynamics 365 (online) supports Azure AD B2B collaboration. For more information, see the Dynamics 365
article Invite users with Azure AD B2B collaboration.
What is the lifetime of an initial password for a newly created B2B collaboration user?
Azure AD has a fixed set of character, password strength, and account lockout requirements that apply equally to
all Azure AD cloud user accounts. Cloud user accounts are accounts that aren't federated with another identity
provider, such as
Microsoft account
Facebook
Active Directory Federation Services
Another cloud tenant (for B2B collaboration)
For federated accounts, password policy depends on the policy that is applied in the on-premises tenancy and the
user's Microsoft account settings.
An organization might want to have different experiences in their applications for tenant users and guest users.
Is there standard guidance for this? Is the presence of the identity provider claim the correct model to use?
A guest user can use any identity provider to authenticate. For more information, see Properties of a B2B
collaboration user. Use the UserType property to determine user experience. The UserType claim isn't currently
included in the token. Applications should use the Graph API to query the directory for the user, and to get the
UserType.
Where can I find a B2B collaboration community to share solutions and to submit ideas?
We're constantly listening to your feedback, to improve B2B collaboration. Please share your user scenarios, best
practices, and what you like about Azure AD B2B collaboration. Join the discussion in the Microsoft Tech
Community.
We also invite you to submit your ideas and vote for future features at B2B Collaboration Ideas.
Can we send an invitation that is automatically redeemed, so that the user is just “ready to go”? Or does the user
always have to click through to the redemption URL?
You can invite other users in the partner organization by using the UI, PowerShell scripts, or APIs. You can then
send the guest user a direct link to a shared app. In most cases, there's no longer a need to open the email
invitation and click a redemption URL. See Azure Active Directory B2B collaboration invitation redemption.
How does B2B collaboration work when the invited partner is using federation to add their own on-premises
authentication?
If the partner has an Azure AD tenant that is federated to the on-premises authentication infrastructure, on-
premises single sign-on (SSO ) is automatically achieved. If the partner doesn't have an Azure AD tenant, an Azure
AD account is created for new users.
I thought Azure AD B2B didn't accept gmail.com and outlook.com email addresses, and that B2C was used for
those kinds of accounts?
We are removing the differences between B2B and business-to-consumer (B2C ) collaboration in terms of which
identities are supported. The identity used isn't a good reason to choose between using B2B or using B2C. For
information about choosing your collaboration option, see Compare B2B collaboration and B2C in Azure Active
Directory.
What applications and services support Azure B2B guest users?
All Azure AD -integrated applications can support Azure B2B guest users, but they must use an endpoint set up as
a tenant to authenticate guest users. You might also need to customize the claims in the SAML token that is issued
when a guest user authenticates to the app.
Can we force multi-factor authentication for B2B guest users if our partners don't have multi-factor
authentication?
Yes. For more information, see Conditional Access for B2B collaboration users.
In SharePoint, you can define an "allow" or "deny" list for external users. Can we do this in Azure?
Yes. Azure AD B2B collaboration supports allow lists and deny lists.
What licenses do we need to use Azure AD B2B?
For information about what licenses your organization needs to use Azure AD B2B, see Azure Active Directory
B2B collaboration licensing guidance.
Next steps
What is Azure AD B2B collaboration?
Getting support for B2B collaboration
5/16/2019 • 2 minutes to read • Edit Online
You’ve read through the documentation, you’ve done the right things, but still can’t get something to work? Open
a support ticket (requires a support plan):
1. In the Azure portal, navigate to the Help and Support blade, and select New Support Request:
Issue type: Technical
Subscription: Choose affected subscription
Service: Active Directory
Support Plan: Choose relevant support plan