The Wayback Machine - https://web.archive.org/web/20241001015621/https://www.geeksforgeeks.org/microsoft-azure-create-alert-for-conditional-access-policy-changes/
Open In App

Microsoft Azure – Create Alert For Conditional Access Policy Changes

Last Updated : 30 Mar, 2023
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

In this article, we will look into the process of creating an alert for Conditional Access Policy Changes. Conditional Access brings signals together, to make decisions, and enforce organizational policies. 

This alert detects :

  1. Creation of a New Conditional Access Policy,
  2. Deletion of a Conditional Access Policy,
  3. Changes to any current Conditional Access Policy.

Prerequisite:

  • Log Analytics Workspace
  • Contributor Access on Subscription or Resource Group to create alerts.

Implementation: 

Follow the below steps to enable alter on conditional policy changes:

Step 1: Login to Azure Portal

Step 2: Navigate to select Log Analytics Workspace >> from left menu select Logs >> Copy the below Search Query and Add Query (Copy the below Search Query) >> Click on Run (Refer Output Screenshot)

Search Query:

AuditLogs
| where Category == "Policy" and LoggedByService == "Conditional Access"
| project ActivityDateTime, InitiatedBy.user.userPrincipalName, TargetResources[0].displayName, ActivityDisplayName

Output:

Step 3: After running the Query, from top-right Click on + New alert rule. Then, click on Condition name and set up the required.

  • Alert Logic: Number of results
  • Operator: Greater than
  • Threshold value : 0

  • Period (in minutes) : 15
  • Frequency (in minutes) : 15

Now Click on “OK”

Step 4: Add Action Group and Configure Notification >> click on Add action group and fill in the following details.

Action Group:

  • Subscription: Provide the Select Subscription
  • Resource group: Provide Select Resource group
  • Action group name : Select Requested Action Group (for example: security-notification)
  • Display name : conditAccess

Notification:

  • Notification type : Email/SMS message/Push/Voice
  • Name: Email-Action
  • Select : Email >> security@domain.com

After filling up the required changes click on save changes.

Customize actions : Email Subject >> Add Subject line >> “Conditional Access Changes Detected – Alert”

Alert rule details:

  • Alert rule name: Conditional Access Changes Detected

Description:

This alert detects:

  1. Creation of a New Conditional Access Policy
  2. Deletion of a Conditional Access Policy
  3. Changes to any current Conditional Access Policy
  • Resource group: Select same as Scope Resource Group
  • Severity: 2 Warning
  • Automatically resolve alerts: false
  • Suppress alerts: false

Step 5: Click on Review and Create. Once the alert is triggered, configured email user will be notified about the alert details.

That’s it, you are done. At this point, we have successfully enabled email alert whenever there are any conditional policy changes.


Previous Article
Next Article

Similar Reads

Microsoft Azure - Create a Custom Policy Initiative in Azure
Here in this article, we'll see how we can create an Azure Custom Policy Initiative using Azure Portal. Before getting started let's know about Custom Initiative. What is Azure Policy Initiative Definition? An initiative definition is a collection of policy definitions that are grouped towards achieving a singular overarching goal. Initiative defin
2 min read
Microsoft Azure - Configuring an Alert Rule with Azure Monitor
The azure monitor is a powerful monitoring tool that works like a smart dashboard for our applications and services by collecting application, guest operating system(OS), Azure resource, Azure subscription, and Azure tenant monitoring data to help us gain insights, understand the performance of our cloud and on-premise applications and services to
4 min read
Microsoft Azure - Get Azure Policies Definitions and Policy Initiatives Definitions
In this article, we will be using some Azure PowerShell Commands either in Azure Cloud Shell or in Azure PowerShell ISE in Admin mode to get the details and properties about the Azure Policies. Let's get started. 1. Use the Get-AzPolicyStateSummary PowerShell command to get the details of the azure policy compliance status of Non-Compliant Resource
1 min read
Microsoft Azure - Preventing Changes to Resources in Azure App Services
In this article, we will look into the process of preventing changes to resources in the Azure App Service. You can make use of locks inside of an Azure App Service to prevent other users in your organization from accidentally deleting or modifying critical resources. Follow the below steps to prevent accidental modification to Azure App service us
1 min read
Microsoft Azure -Create a User in Microsoft Entra ID from Azure Portal
A user in Microsoft Entra ID is an individual who can get access to Azure identity. This Microsoft Entra ID identity can be used to access applications and resources that are protected within the organization or project. Users can be created manually or automatically, and they can be assigned to groups and roles to control their access permissions.
3 min read
Microsoft Azure - Get Azure VM Properties using Azure PowerShell
The purpose of using the Azure PowerShell Commands is to quickly analyze the overall properties of VM/VMs at once the filtering the with select and where conditions. To find the properties of an Azure VM, you can perform the following commands in Azure Cloud Shell to get the details. Command: Get-AzVM Output: 1. Get all properties of an Azure Virtu
2 min read
Microsoft Azure - RDP to Azure Virtual Machines using Azure Bastion
In this article, we will learn how to do RDP(Remote Desktop Protocol) / SSH(Secure Shell) Connection to an Azure VM using Azure Bastion. First, let's discuss Azure Bastion. The Azure Bastion service is a fully platform-managed PaaS service that you provision inside your virtual network. It provides secure and seamless RDP/SSH connectivity to your v
3 min read
Microsoft Azure - Configure Azure SQL with Azure CLI
In this article, we're going to take a closer look at how you can configure something like connectivity using the Azure CLI. What we have here is we are in Azure Data Studio and similar to the SQL notebook we are actually using a PowerShell notebook. That just means all our code cells are going to run PowerShell and we are just connecting to localh
4 min read
Microsoft Azure - Get CPU Utilization Data of a Azure VM in Azure Portal
Azure Virtual Machines (VM) is one of several types of on-demand, scalable computing resources that Azure offers. In this article, we will look into the process of getting the CPU Utilization data of an Azure VM in Azure Portal. Implementation: Follow the steps to get the CPU Utilization of an Azure VM in Azure Portal: Step 1: Log in to your Azure
2 min read
Microsoft Azure - Archive Azure VM to Azure Storage Account
In this article, we will be implementing a solution to archive a select azure VM snapshot to a select storage account for archiving using azure cloud shell. For implementation, we will be using Azure CLI commands. Prerequisite:VM SnapshotA storage account is neededUser needs "Storage Blob Contributor Data" IAM Role Access on Archiving Storage Accou
2 min read
Microsoft Azure - Check Status of Azure VM using Azure PowerShell
The following Azure PowerShell command helps you to find the Azure VM Config and properties details of Os Name, Os Version, Hyper V Generation, Disks properties, Extensions properties of Type Handler Version, Status and Message, VM Agents properties of Type Handler Version, Status and Message and also VM Power Status Codes, Messages, Plugins, Time
3 min read
Microsoft Azure - Azure VM Disk Space in Percentage using Azure KQL
Here we'll be using the Azure Insights Metric Query to find the free disk space in percentage using KQL. The purpose of this query is to find disk drive free space of all the Azure VMs without logging into every server. You can Run the following KQL log Queries in Azure Monitor or Azure VM Logs or Log Analytics Workspace. Note: VM Insights Agent sh
1 min read
Microsoft Azure - Enable Azure Monitor VM Insights Agent For Azure VM
Azure Monitor VM Insights Agent enables you to get more visibility into the health and performance of your Azure VM. Here we'll see how we can enable Azure Monitor VM Insights to monitor the health, performance, and dependencies of azure virtual machines. Implementation: Follow the below steps to enable Azure Monitor VM insights agents for an Azure
2 min read
Microsoft Azure - Azure CLI Commands to Manage Azure VMs
Azure Command-line interface is used to manage or to create Azure resources. By using the simple AZ CLI command we can manage Azure VM quickly and at a Scale. Let's get started by using a few important Azure CLI commands to manage Azure Virtual Machines. 1. Start a Specific Stopped VM in a Select Resource Group Use the below command to start a spec
2 min read
Microsoft Azure - Manage Azure VMs using Azure PowerShell Commands
Here we are using Azure PS Commands to manage azure resources from Azure Cloud Shell or by using Windows PowerShell. By using the simple AZ PS command we can manage Azure VM Quicks without any efforts of navigating in Azure Portal and at Scale. Let's get started by using the major Azure PS commands to manage Azure Virtual Machine. 1. Start a Specif
2 min read
Microsoft Azure - Query Azure Storage Logs in Azure Monitor Log Analytics
Pre-requisite:- Azure Log Analytics is a tool offered by Azure, which is used to edit and run log queries against data in the Azure Monitor Logs store and helps interactively analyze their results. One can easily use Log Analytics queries to retrieve records that match particular criteria, identify trends, analyze patterns, and provide various insi
5 min read
Microsoft Azure - Install Azure Command Line Interface (Azure CLI)
Azure CLI is a very powerful tool that can be used to automate tasks, create, update, manage or delete azure resources or to troubleshoot problems with az module cmdlets. By installing az modules on your system or on your development system you and your development team can easily create, update or manage Azure AD and Azure resources such as manage
4 min read
Microsoft Azure - Checking your Access on Azure Subscription
In this article, you will see the process of how to view your azure role assignment on azure subscriptions and also on selecting azure subscriptions at resource group level or on resource level. Implementation: Follow the steps below to view your access on Azure subscriptions: Step 1: Log in to Azure Portal. Step 2: After logging in to your Microso
2 min read
Microsoft Azure - Create and Assign Policy for "Not Allowed Resource Types"
Pre-requisite: Azure In this article, we will show you how to deny the resource creation of your choice on azure subscriptions or management groups by implementing a rule policy. By implementing this policy on the specific subscription you can restrict your subscription users to create unwanted resources and also reduce the additional cost incurred
2 min read
Microsoft Azure - Reviewing Access using My Access
Azure Ad Access Reviews enable you to manage users assigned to groups apps roles and access packages conducting reviews on a regular basis ensures that only the right people have the right access. Implementation: Follow the below steps to review access using My Access: Step 1: Let's take a look if you've been assigned as a reviewer open the invitat
2 min read
Microsoft Azure - Setup Budget Alert and Configure Email Notification
Budgets Alert is a Cost Management tool in Microsoft Azure that helps you to get notified about your active azure subscription spending to proactively manage the costs of your azure resources which are being used. With these Azure budget alerts, you can track and monitor spending. This also helps to analyze the cost and to manage your budget to sav
2 min read
Microsoft Azure- Backing Up, Restoring, and Cloning Microsoft Azure App Services
Microsoft is well known for developing relevant software which are using in today's time of technology to conquer the demand of users and developers to build up applications. In sequence of it Microsoft introduces Azure well known as Microsoft Azure to make quality applications. In this article, we will discuss Backing up, restoring and cloning Mic
8 min read
Microsoft Azure- Disk Storage in Microsoft Azure
Azure Disk Storage is the only shared cloud block storage that supports both Windows and Linux-based clustered or high-availability applications via Azure shared disks. There are two types of Disks in Azure : Managed Disks Unmanaged Disks.Managed DisksSimplest optionLower management overhead as Azure manages the storage accounts.Only LRS replicatio
6 min read
Azure AD Conditional Access Policies Explained
Microsoft Azure is Microsoft’s primary cloud offering. The Microsoft cloud lives within Microsoft Azure, which is a combination of ultra-redundant data centers located all over the world that offer storage, power, cooling, and all the necessary infrastructure to host cloud servers. So, Microsoft Azure provides X as a service solution. So what does
8 min read
Microsoft Azure - Export Policy Assignments
Pre-requisite: Azure In this article, we will show you how to export the azure policy assignments from a select Azure Subscription from the Azure Cloud Shell with the help of Azure PowerShell run commands. To export the list of azure policy assignments one should require the RBAC reader access role on the select azure subscription to fetch and expo
2 min read
Microsoft Azure - Creating JSON Snippet For Policy Initiative Creation using CSV File
Here in this article, we are going to create a custom JSON script by using the data filled in the CSV file for automation. What we are going to do is first we'll convert a list of given Policy IDs from CSV to JSON Code Snippet as a prerequisite for creating a custom policy initiative definition for automation. Implementation: Follow the below steps
2 min read
Microsoft Azure - Creating Custom Policy Initiative using PowerShell
In this article we'll see how we can create an Azure Custom Policy Initiative Definition with a JSON file using the Azure PowerShell commands in simple easy steps. What is Custom Policy Initiative Definition? Custom Policy Initiative is a collection or group of policy definitions that are grouped to apply policies together for a specific organizati
2 min read
Microsoft Azure - Built-in Policy Definitions and It's Count using PowerShell
In this article, we will see how we can get the azure built-in policy definitions with their display names and also the count of policy definitions within the select scope in Azure using the Azure PowerShell commands. The purpose of finding to know the policy definition and count which is being applied on the select scope. So, that users can add or
1 min read
Microsoft Azure - Add Assignment to Custom Policy Initiative
In this article, we will add an assignment to an already existing custom policy initiative definition using azure PowerShell commands. Here policy assignment is a kind of instructions to apply or stop the action of policies on Azure resources. We can restrict a few executions, update, creations, modifications by applying the policy assignments to s
2 min read
Microsoft Azure - How to a Add a Tag Policy for Resource Group?
Pre-requisite: Azure Here in this article, we will show how to assign and Add a Tag Policy for Resource Group in Azure from Azure Portal. With this Add a Tag Policy for Resource Groups we can maintain Real-time control and compliance assessment at scale for all the resource groups within a scope. Assigning a Tag policy helps add a Tag Name and Tag
2 min read