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

Microsoft Entra ID – Blocking external access to Dynamics 365 using conditional access policy

Posted on February 4, 2020

Hello, everyone. In today’s article, we’ll explain step by step how to block access to Dynamics applications by location using a conditional access policy. This scenario is quite common in organizations that want to allow access to applications only through trusted networks.

Creating a named location

Let’s create a trusted network to exclude from the access blocking policy.

Access the Conditional Access – Named locations menu by clicking this link.

Click New location to create a new named location.

Let’s enter the named location information:
1 – Location name.
2 – Let’s create a location by country/region.
3 – Let’s select Brazil as the country allowed for access.

Click Create.

Creating the external access blocking policy

Now let’s create the conditional access policy to block access coming from countries other than Brazil.

Click this link to access the Conditional Access – Policies menu.

Enter the policy name in the Name field.

Let’s select the users who will receive the policy by performing the steps below:
1 – Select the Users and groups menu.
2 – Select All users.

Click Done.

To select the application to be controlled by the policy, perform the steps below:
1 – Select the Cloud apps or actions menu.
2 – Select Select apps and then Select.
3 – Search for the Common Data Service application.
4 – Select the application.

Click Select and then Done.

Let’s configure the location by performing the steps below:
1 – Select the Conditions menu.
2 – Select the Locations menu.
3 – Enable the Locations option by clicking Yes.
4 – Select the Any location option to cover all locations.

Click Done.

Still in the Locations option, let’s exclude Brazil from the policy by performing the steps:
1 – Click Exclude.
2 – Select the Selected locations option and then Select.
3 – Select the named locations that will be excluded from the policy.

Click Select, then Done and Done again.

Now let’s define the access control for this policy. Perform the steps below:
1 – Select the Access controls option.
2 – Check the Block access control.

Click Select.

Let’s enable the policy by clicking On in the Enable policy option.

Click Create.

Testing access to the Dynamics 365 application from Brazil

Let’s validate that the policy we just created works by accessing the link of the application hosted in Azure. For our illustration, we’ll access the URL https://ulyneves.crm4.dynamics.com/ from inside Brazil.

Enter the user’s credentials in Azure.

Access originating from an IP in Brazil is granted to the user.

Monitoring access through the Sign-ins menu

Let’s check the access we just simulated through the Sign-ins menu in Azure. To access this menu, click this link.

On the Basic Info tab, we can see that access was granted to the Common Data Service application, which is required when accessing Dynamics applications.

On the Conditional Access tab, we can see that the created policy was not applied to the access, in the Result column with status Not Applied.

Testing access to the Dynamics 365 application from outside Brazil

Now let’s access the same URL from the previous test through an IP outside Brazil. Let’s simulate this access using the Tor browser’s proxy function. To use this browser, download it from this link.

Enter the user’s credentials.

Access is validated, but it is blocked by the conditional access policy we created.

Monitoring access through the Sign-ins menu

Let’s check the reason for the simulated access block through the Sign-ins menu in Azure. To access this option, click this link.

On the Basic info tab, we can see in the Sign-in error code field the code 53003 – Access has been blocked due to conditional access policies.

On the Conditional Access tab, we observe that the result of the conditional access policy is Failure, which identifies the access block.

On the Location tab, we confirm access from outside Brazil.

Summary

In today’s article, we explained step by step how to block access to Dynamics 365 applications using a location-based conditional access policy.

I hope this content has helped enrich your knowledge of Azure.

Did you like the post?

Like it and share it. 🙂

If you have any suggestions or comments, let us know.

[ ]’s

Related guides: Browse the Microsoft Identity Troubleshooting Index or the Microsoft Entra Conditional Access topic archive.

Leave a Reply Cancel reply

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

Recent Posts

  • Conditional Access report-only: why a successful sign-in can show a policy failure October 9, 2026
  • Microsoft Entra SMS and Voice Retirement: An Admin Preparation Checklist September 24, 2026
  • 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

Archives

  • October 2026
  • 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}