Service principal names - Win32 apps (2024)

A service principal name (SPN) is a unique identifier of a service instance. Kerberos authentication uses SPNs to associate a service instance with a service sign-in account. Doing so allows a client application to request service authentication for an account even if the client doesn't have the account name.

If you install multiple instances of a service on computers throughout a forest, each instance must have its own SPN. If there are multiple names that clients can use for authentication, a service instance can have multiple SPNs. For example, because an SPN always includes the name of the host computer on which the service instance is running, a service instance might register multiple SPNs, one for each name or alias of its host. For more information about SPN format and composing a unique SPN, see Name formats for unique SPNs.

Before the Kerberos authentication service can use an SPN to authenticate a service, the SPN must be registered on the account object that the service instance uses to sign in. A given SPN can be registered on only one account. For Win32 services, a service installer specifies the sign-in account when an instance of the service is installed. The installer then composes the SPNs and writes them as a property of the account object in Active Directory Domain Services. If the sign-in account of a service instance changes, the SPNs must be re-registered under the new account. For more information, see How a service registers its SPNs.

When a client wants to connect to a service, it locates an instance of the service, composes an SPN for that instance, connects to the service, and presents the SPN for the service to authenticate. For more information, see How clients compose a service's SPN.

In this section

This section includes the following articles:

See also

Service principal names - Win32 apps (2024)

FAQs

What is an example of a service principal name? ›

Service principal names

For example, imap/imap.example.com is the principal name of the “imap” service on the host “imap.example.com”. Other possible service names for the first component include “host” (remote login services such as ssh), “HTTP”, and “nfs” (Network File System).

What is the principal service name? ›

A Service Principal Name is a concept from Kerberos . It's an identifier for a particular service offered by a particular host within an authentication domain. The common form for SPNs is service class / fqdn @ REALM (e.g. IMAP/mail.example.com@EXAMPLE.COM ).

How do I check my SPN records? ›

How to Check SPNs. Use the setspn -l hostname command at a command prompt to display a list of the SPNs that a computer has registered with Active Directory, where hostname is the actual hostname of the computer object you want to query.

How do I remove a service principal name? ›

To remove an SPN, use the setspn -d service/name hostname command at a command prompt, where service/name is the SPN that is to be removed and hostname is the actual host name of the computer object that you want to update.

What are the 3 part service principal names? ›

The first part is the service class, the second part is the host name, and the third part (if present) is the service name. The host name part can optionally be suffixed with either a ":port" component or an ":instancename" component.

What is the difference between user principal name and service principal name? ›

(instead of user name & password in case of User principal.) In summary, User Principals represent individual users, while Service Principals represent applications or services.

Where do I find my service principal ID? ›

Find a Service Principal ID

Sign in to the Azure portal. Select Azure Active Directory from the menu. Select App registrations. Select your application and copy the Object ID.

How do I create a new service principal? ›

Creating a Service Principal for the DSV Base Secret
  1. Go to the Microsoft Azure portal and login.
  2. Go to Azure Active Directory.
  3. Click App registrations then New registration. ...
  4. Take note of the Application (client) ID and Directory (tenant) ID. ...
  5. Select Certifications & secrets then New client secret.

What is your principal name meaning? ›

1 first in importance, rank, value, etc.; chief. 2 denoting or relating to capital or property as opposed to interest, etc. n. 3 a person who is first in importance or directs some event, action, organization, etc.

How do I get a list of all SPN? ›

To list all SPNs in the Windows domain, you can use the Get-ADServiceAccount cmdlet along with the -Filter parameter. Open PowerShell and run the following command: Get-ADServiceAccount -Filter 'ServicePrincipalNames -like "*"' | Select-Object -ExpandProperty ServicePrincipalNames.

Where is SPN record stored? ›

If the service runs under a user account, the SPNs are stored in the servicePrincipalName attribute of that account. If the service runs in the LocalSystem account, the SPNs are stored in the servicePrincipalName attribute of the account of the service's host computer.

What is the command to register SPN? ›

If you are using Active Directory as your Kerberos implementation, use the setspn command to register the SPN. To run this command, the following conditions must be satisfied: You must be logged on to a domain controller. You must run the command prompt with elevated privileges (run as administrator)

What are accounts with service principal names? ›

A Service Principal Name (SPN) is an attribute of a user or a computer in the Active Directory environment. SPNs are used to support mutual authentication between a client application and a service using Kerberos without transmitting sensitive authentication data to the service.

Is a service principal a service account? ›

Service principal is sort of a service account. It is the thing that permissions are assigned to. For example, if you consent to an application reading your user profile on your behalf, that adds an OAuth 2 permission grant to the service principal.

What is a service principal account? ›

A service principal is an identity that you create in Databricks for use with automated tools, jobs, and applications. Service principals give automated tools and scripts API-only access to Databricks resources, providing greater security than using users or groups.

What is the principal user name? ›

Definitions: In Windows Active Directory, this is the name of a system user in email address format, i.e., a concatenation of username, the “@” symbol, and domain name.

What is a unique principal name? ›

User Principal Name (UPN) is a unique identifier used in IT systems to represent a user's digital identity. It plays a crucial role in defining how a user is recognized within networks and applications. By incorporating the UPN, systems can accurately attribute actions and access rights to the corresponding individual.

How do I create a service principal name in Active Directory? ›

Start this procedure
  1. To open the Active Directory Users and Computers (ADUC) Microsoft Management Console (MMC) console, on the Active Directory server click StartRun, enter dsa. ...
  2. Right-click the folder where you want to create the account and select NewUser.
  3. Complete these fields: ...
  4. Click Next.

Top Articles
Latest Posts
Article information

Author: Dean Jakubowski Ret

Last Updated:

Views: 6307

Rating: 5 / 5 (50 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Dean Jakubowski Ret

Birthday: 1996-05-10

Address: Apt. 425 4346 Santiago Islands, Shariside, AK 38830-1874

Phone: +96313309894162

Job: Legacy Sales Designer

Hobby: Baseball, Wood carving, Candle making, Jigsaw puzzles, Lacemaking, Parkour, Drawing

Introduction: My name is Dean Jakubowski Ret, I am a enthusiastic, friendly, homely, handsome, zealous, brainy, elegant person who loves writing and wants to share my knowledge and understanding with you.