11-22-2022 09:32 PM
A third-party service that wishes to access your Azure resources does this via an application. Applications are used by Azure to delegate identity and access management functions. When you register an application with Azure Active Directory, you create an identity configuration for your application that allows it to integrate with Azure Active Directory.
At a high level, the third-party (such as Alteryx Designer) talks to the application. Then, the application handles the authorization and access to your Azure resources. An example of an Azure application is shown below:
Applications are created when:
The first path is manual and requires that an admin knows all of the permissions that the third-party source needs. This is possible to do, but requires multiple steps to achieve and can be slightly different for each third-party application. It could be preferred if your tenant has specific restrictions on the types of applications that can be created.
The second path is simpler. The third-party developer can create an application with all the necessary configuration details and permissions. This is referred to as an application object, and it lives in their tenant (known as the “home” tenant). When you register an application, both an application object and a corresponding service principal object are created for that tenant. This is shown in the image below.
This type of application object is a multi-tenant application. It is referred to as “multi-tenant” because the application can be used in multiple customer environments (aka tenants).
Think of this application object as a template to create one (or more) service principals. The next section will explain exactly how the service principal is created in the customer tenant, but let’s cover a few more points on service principals before moving forward.
A service principal object is created in every tenant where the application is used. This image shows the service principal objects that are created based on the application object and live in their respective tenants.image.jpeg
This is how Microsoft explains the relationship between an application object and the service principal(s):
The application object is the global representation of your application for use across all tenants, and the service principal is the local representation for use in a specific tenant. The application object serves as the template from which common and default properties are derived for use in creating corresponding service principal objects.
This service principal defines things like:
Users and admins in the customer’s tenant control the service principal that is registered. This ensures that the application has the necessary permissions that the third-party requires while also giving the customer’s Azure admin the ability to manage things like:
This is covered in more detail in the section Properties of the Service Principal.
To summarize, creating an application in Azure substantiates:
In some documentation online, you will see the terms Service Principals and Enterprise Applications used interchangeably. The remainder of this article will focus on the object that is created in the customer’s tenant and is owned and controlled by the customer; we will call this the Service Principal.
Alteryx created a multi-tenant application that lives in the Alteryx tenant. This application is configured with the settings that Designer needs in order to connect to the Azure resources; this includes things like the Redirect URL, the logo, certain permissions, etc.
The permissions our application requires are shown in this consent prompt. By default in Azure, all users are allowed to consent to applications for permissions that don't require administrator consent. See Microsoft’s documentation for more details: How and why apps are added to Azure AD - Microsoft Entra | Microsoft Learn.
Depending on the settings configured in Company A’s tenant OR the permissions requested, an admin may be required to consent. This will be discussed in more detail later in the section Understanding Admin Consent.
image.jpeg
Once that is accepted and the user or admin logs in, a service principal is created in Company A’s tenant.
Once this is complete, by default, all users in Company’s A tenant will be able to access this application from Designer. A service principal that points back to our application has been created. The name of this service principal is the same as our application - “Alteryx Analytics Connector”.
For this section, we will assume that consent was granted and the service principal was created in the customer’s tenant.
Our application is called the Alteryx Analytics Connector. If you have access to the Azure portal, you can find your service principal by following these steps:
image.png
Alternatively, you can search using the Application ID: d6a8f12f-84ed-45f6-90a3-b04c43f8ca09
.
This application ID is a reference to the application object in Alteryx's tenant, which is why the ID is the same for all the respective service principals. Notice the Object ID is greyed out - this is because this is the unique Object ID for the service principal (so I’ll keep this private).
If you cannot find this Application ID, remember that the service principal cannot be created in your tenant if a user or admin has not first consented to the application! The user may not have provided consent, or an admin consent may be required.
Once you are on the service principal’s page, you can view the Properties of the service principal in your tenant.
As the application object is created and managed in the home tenant (Alteryx’s tenant) only some of the properties are configurable in the customer’s tenant. Some things, like the Name of the application, cannot be changed.
Property Name | Description from Microsoft | Link |
---|---|---|
Enabled for users to sign-in? |
| Properties of an enterprise application - Microsoft Entra | Microsoft Learn |
Assignment required? |
| Properties of an enterprise application - Microsoft Entra | Microsoft Learn |
Visible to users? |
| Properties of an enterprise application - Microsoft Entra | Microsoft Learn |
Notes | You can use this field to add any information that is relevant for the management of the application. The field is a free text field with a maximum size of 1024 characters. | Properties of an enterprise application - Microsoft Entra | Microsoft Learn |
Files.Read.All
- does that mean that any user who accesses this application will be able to read all files in the tenant?
However, some access requests can only be approved by an admin. Additionally, your tenant could be configured to block users from being able to consent to applications, meaning that only admins can consent to new applications.
In this case, the consent prompt will show this:
image.jpeg
Since a non-admin user cannot proceed further past this prompt, the service principal is not created in the tenant because consent cannot be granted. This means your admin will not be able to find it in your tenant.
So how does a non-admin user proceed? Unfortunately, this may not be straightforward. Azure acknowledges this in their documentation:
The above example dialog shows the default (out of the box) experience for permissions that require admin consent. Most users don't know what to do in this scenario. They don't know who their admin is, they don't know who to go to for approval. This uncertainty can limit the user's ability to achieve desired results.
Additionally, there is no way for us (Alteryx) to know if admin consent is required in your tenant for any given application:
you never know which permissions will require admin consent and which allow a regular user to grant consent because tenant admins can configure their tenant with Do not allow user consent (all permissions require admin consent)
Here are a couple of different experiences to highlight this point:
See Microsoft’s documentation for full details: Overview of user and admin consent - Microsoft Entra | Microsoft Learn
Microsoft’s answer to this is the “admin consent workflow”. This can be enabled in your tenant by an admin. See Requesting permissions that require administrative consent | Microsoft Learn.
This turns the unfriendly prompt above into a more friendly window that allows users to provide a justification that is sent directly to the admin.
image.png
A beautiful knowledge sharing.
Will read this again and again.