Skip to content

Ulysses Neves

Microsoft Entra ID, authentication, and hybrid identity troubleshooting.

Menu
  • Início
  • Microsoft Azure
  • Microsoft AD FS
  • Microsoft 365
  • Contact
Menu

AD FS – Controlling access to applications using Banned Ip List on AD FS

Posted on 6 de January de 2021

Hi guys. Today I will share with you quickly a security feature on AD FS called Banned IP List. It was introduced on Windows Server version 2016 to help admins control access to applications hosted in AD FS based on IP. It can be considered in scenarios where admins want to block IPs that are considered malicious or for any reason should not access Applications integrated to AD FS.

Let’s start enabling this feature on AD FS primary server running command below in PowerShell:

Set-AdfsProperties -AddBannedIps "111.222.333.444"

Note: In this demonstration, we’re going to configure my specific public IP, but you can configure a single IP or a range of IPs to be blocked.

Testing access to Application

Users that have the IP added to the banned list, will face an error Incorrect user ID or password. Type the correct user ID and password, and try again. that is similar to the error when you provide bad credentials:

Checking debug logs on AD FS

To get into more details in how AD FS validates the credential, I’ve enabled the Debug logs in the AD FS server.

The IP validation is part of the process called Pre-Auth Check and starts calling BannedIpProvider to get information about IPs marked as banned in the AD FS database.

AD FS matches the Ips registered as banned in its database against the incoming IP or IP in the x-forwarded-for or x-ms-forwarded-client-ip headers to block or allow the authentication.

As my public IP matches to the one registered in the Banned Ip list, the result is blocking.

And the response from Banned Ip Provider is Deny request due to ip xxx.xxx.xxx.xxx (incoming IP).

As result, we can see Exception in Event viewer showing as MSIS7010:Authentication failed.

Removing IPs from the Banned Ip List

To remove the IP or a range of IPs from the Banned Ip List, run the command below:
Note: Change the IP below to the IP or IP range you wish to unblock.

Set-AdfsProperties -RemoveBannedIps "111.222.333.444"

Testing access to Application

After I’ve removed my public IP from the Banned Ip List, my test user fred@ulyneves.com was able to access Office 365 through AD FS.

Checking debug logs on AD FS

Now that we have a successful sign in, let’s check the in details the same information, but now with an IP that is not in the banned list.

Checking event below, we see AD FS loading the banned Ip list from its database.

In the next step, we see AD FS service matching the received IP against the list of banned Ips in the AD FS database.

The result now is Allow request.

With allowed result generated by BannedIpProvider validation, the event below can be seen as the result for Analyze Pre-Auth Request: AnalyzePreAuthRequest BannedIpProvider returned Unrestricted

Summary

In this article, we covered the feature Banned Ip List on AD FS, shared in details how the Ips are validated when this feature is configured and the user experience when the IP is banned.

I hope you have enjoyed reading this article and it helps you when administering your AD FS environment.

Enjoyed the article? Like and share. 🙂

In case you have any suggestion or feedback, please leave a comment.

[ ]’s

Ulysses Neves

Leave a Reply Cancel reply

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

Recent Posts

  • Microsoft Authenticator Will Block Jailbroken Devices in 2026 — What You Need to Know 17 de March de 2026
  • Enhancing Azure role activation security with FIDO2/Passkeys 23 de September de 2024
  • Microsoft Entra ID CAP | Enforcing WHfB using Authentication Strength 21 de April de 2024
  • Troubleshooting Error Code ‘0x000005e’ in WHfB: PIN Authentication Woes 11 de February de 2024
  • WHfB: Fixing Windows Hello for Business error ‘LogoncertTemplateReady: NO (StateNoTemplate)’ 29 de December de 2023

Archives

  • 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 #aadhybridjoin #adfs #adfsonsql #azuread #azureauth #azureCA #azuredevice #azurehybridjoin #azuremfa #azuresecurity #capolicy #cloudkerberostrust #conditionalaccess #conditionalaccesspolicy #deviceregistration #gmsaaccount #gopasswordless #hybridaadjoin #mfaserver #msadfs #msazure #msidentity #namedlocation #sslcertificatevalidation #tshootadfs #tshoothybridjoin #tshootwaptrust #waptrust #WHFBcerttrust #whfbdeployment #WHfBhybridsetup #widdatabase adconnect authenticationcontext authenticationstrength az500 azuread azuremfa azurepim azuresecurity cloudsecurity microsoft365 msazure 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}