Skip to content

Ulysses Neves

Microsoft Entra ID, authentication, and hybrid identity troubleshooting.

Menu
  • Home
  • Microsoft Azure
  • Microsoft AD FS
  • Microsoft 365
  • Contact
  • Troubleshooting Index
Menu

AD FS – How to Configure JEA (Just Enough Administration) with AD FS

Posted on July 28, 2020

Hello everyone. In today’s article, I’ll explain how to configure JEA (Just Enough Administration) in the AD FS service. This feature allows AD FS service administrators to delegate limited access to other users without the need to grant administrative access to the servers. One example is delegating to user support technicians permission to unlock accounts locked by AD FS Smart lockout.

What is JEA (Just Enough Administration)?

JEA allows administrators to delegate limited access within a given service to other users without allowing administrative access to the servers, preventing unnecessary access and controlling the administrative activities performed on the servers. More information about this feature can be found through this link.

We will perform the following activities in this article:

  • Create the gMSA service account for use in the lab.
  • Configure JEA on the AD FS servers.
  • Install the gMSA account on the AD FS servers.
  • Create the delegated access group.
  • Create the RoleCapabilities folder.
  • Create the PowerShell role configuration files.
  • Register the remote session using the configuration files.
  • Perform the remote access test using PowerShell with a test user.

Creating the service account (gMSA)

The steps below must be performed on a domain controller server.

Run the command below if this is the first gMSA account in the domain:

Add-KdsRootKey -EffectiveTime ((get-date).addhours(-10))

In our case, since it is not the first account, we will run the command below:

Get-KdsRootKey

With the KeyID in hand, we can proceed with configuring the service.

Configuring JEA on the AD FS servers

We will now run the commands below on the AD FS servers:

$adfsServer = Get-ADComputer -Identity "AD FS server hostname"

If you have more than one AD FS server, run the command on all servers.

Run the command below on a domain controller server to create the new service account and grant it permission on the AD FS servers.

$ServiceAccount = New-ADServiceAccount "nome da conta de serviço" -DNSHostName "FQDN do domínio que contém o KeyID" -PrincipalsAllowedToRetrieveManagedPassword $adfsServer –passthru

We will now run the command below on the AD FS servers:

Add-ADComputerServiceAccount -Identity "servidor AD FS" -ServiceAccount $ServiceAccount

Installing the gMSA account on the AD FS server

Install-ADServiceAccount "conta de serviço criada anteriormente"

We will grant local administrator permission on the AD FS server by adding the gMSA account to the “Administrators” group

We will now create the security group that will allow us to give its members controlled privileges in the AD FS service.

We will create the security group in AD and include at least one user for our test.

Creating a delegated administrators group

In our example, I will create the ADFSAdmins security group and include the user otto@ulyneves.com.

Creating the “RoleCapabilities” folder

On the AD FS server, we will create the folder that will store the roles by running the commands below:

$modulePath = Join-Path $env:ProgramFiles "WindowsPowerShell\Modules\ADFSActivity"
New-Item -ItemType Directory -Path $modulePath
New-Item -ItemType File -Path (Join-Path $modulePath "ADFSActivityFunctions.psm1")
New-ModuleManifest -Path (Join-Path $modulePath "ADFSActivity.psd1") -RootModule "ADFSActivityFunctions.psm1"
$rcFolder = Join-Path $modulePath "RoleCapabilities"
New-Item -ItemType Directory $rcFolder

For convenience, we ran the commands above using PowerShell ISE.

Creating the PowerShell role configuration files

We will now create the role configuration files and store them in the folder on the AD FS server through the $rcFolder variable created in the previous step.

@{
GUID = '752d9f89-5dc8-4720-9baf-a9ea2749ab5b'
ModulesToImport = 'ADFS'
VisibleCmdlets = 'Reset-AdfsAccountLockout', 'Get-ADFSAccountActivity', 'Set-ADFSAccountActivity', 'Get-AdfsProperties'
}

Save the file on the AD FS server as: C:\Program Files\WindowsPowerShell\Modules\ADFSActivity\RoleCapabilities\ADFSActivity.psrc

We will create another .pssc file to integrate the security group created in AD with the “ADFSActivity” module.

Open Notepad, paste the information below, and change only the security group and the gMSA account created at the beginning of this article.

@{
SchemaVersion = '2.0.0.0'
GUID = 'ffb4c0b2-f161-4ddc-a769-d2419b489170'
SessionType = 'RestrictedRemoteServer'
ModulesToImport = 'ADFSActivity'
GroupManagedServiceAccount = 'Conta gMSA criada'
RoleDefinitions = @{ 'domínio\grupo de segurança' = @{ RoleCapabilities = 'ADFSActivity' } }
}

Save the file as ADFSActivity.pssc in the same directory as the ADFSActivity.psrc file from the previous step.

Registering the remote session using the configuration files

With the files created, we will now register the session configuration in AD FS using the created files. To do this, run the command below:

Register-PSSessionConfiguration -Name 'ADFSActivity' -Path "C:\Program Files\WindowsPowerShell\Modules\ADFSActivity\RoleCapabilities\ADFSActivity.pssc" -Force

Testing permissions in the AD FS service using PowerShell

With the configuration completed on the AD FS servers, we will now test user Otto@ulyneves.com’s access to the AD FS server through a remote session using PowerShell.

Let’s sign in to a desktop with the otto@ulyneves.com account and open PowerShell. We will run the following command to remotely access the AD FS server:

Enter-PSSession -ComputerName 'ADFSServerName' -ConfigurationName ADFSActivity

We will now run the get-command command to confirm which commands can be run by user Otto on the AD FS server.

We can see that user Otto does not have the same access as an administrator on the AD FS server.

Summary

In today’s article, we demonstrated how to integrate JEA (Just Enough Administration) with the AD FS service. In the next article, we will talk about AD FS Smart lockout and how to use this AD FS feature to protect against improper access and unwanted lockouts on user accounts.

I hope this content has helped enrich your knowledge of AD FS.

Did you enjoy the post? Like and share it. 🙂

If you have any suggestions or comments, leave a comment.

Best regards,

Ulysses Neves

Related guides: Browse the Microsoft Identity Troubleshooting Index or the Microsoft AD FS topic archive.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Microsoft Defender for Identity domain investigation: six questions to ask first September 10, 2026
  • Microsoft Entra Kerberos key rotation: what changes—and what administrators should check September 6, 2026
  • Microsoft Authenticator Will Block Jailbroken Devices in 2026 — What You Need to Know March 17, 2026
  • Enhancing Azure role activation security with FIDO2/Passkeys September 23, 2024
  • Microsoft Entra ID CAP | Enforcing WHfB using Authentication Strength April 21, 2024

Archives

  • September 2026
  • March 2026
  • September 2024
  • April 2024
  • February 2024
  • December 2023
  • September 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019

Tags

#aaddownleveldevice #adfs #adfscertificate #adfscertificates #adfsmfaadapter #azureauth #azureCA #azuredevice #capolicy #cloudsummit2021 #conditionalaccess #conditionalaccesspolicy #deviceregistration #farmbehavior #gopasswordless #mfaserver #msidentity #namedlocation #securingazure #securingazuread #sslprivatekey #troubleshootingadfs #troubleshootingwaptrust #tshootadfs #waptrust #webapplicationproxy #WHFBcerttrust #whfbdeployment #WHfBhybridsetup #WHfBprovisioning #widdatabase adconnect AD FS authenticationstrength az500 azurepim Azure security cloudsecurity microsoft365 Microsoft Azure Microsoft Entra hybrid join Microsoft Entra ID Microsoft Entra MFA PowerShell WHfB
©2026 Ulysses Neves | Design: Newspaperly WordPress Theme
Ulysses Neves
Gerenciar Consentimento de Cookies
Para fornecer as melhores experiências, usamos tecnologias como cookies para armazenar e/ou acessar informações do dispositivo. O consentimento para essas tecnologias nos permitirá processar dados como comportamento de navegação ou IDs exclusivos neste site. Não consentir ou retirar o consentimento pode afetar negativamente certos recursos e funções.
Funcional Always active
O armazenamento ou acesso técnico é estritamente necessário para a finalidade legítima de permitir a utilização de um serviço específico explicitamente solicitado pelo assinante ou utilizador, ou com a finalidade exclusiva de efetuar a transmissão de uma comunicação através de uma rede de comunicações eletrónicas.
Preferências
O armazenamento ou acesso técnico é necessário para o propósito legítimo de armazenar preferências que não são solicitadas pelo assinante ou usuário.
Estatísticas
O armazenamento ou acesso técnico que é usado exclusivamente para fins estatísticos. O armazenamento técnico ou acesso que é usado exclusivamente para fins estatísticos anônimos. Sem uma intimação, conformidade voluntária por parte de seu provedor de serviços de Internet ou registros adicionais de terceiros, as informações armazenadas ou recuperadas apenas para esse fim geralmente não podem ser usadas para identificá-lo.
Marketing
O armazenamento ou acesso técnico é necessário para criar perfis de usuário para enviar publicidade ou para rastrear o usuário em um site ou em vários sites para fins de marketing semelhantes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Ver preferências
  • {title}
  • {title}
  • {title}