Skip to content

Instantly share code, notes, and snippets.

source="AuditLogs_2025-05-09.json" host="auditlog" index="entra1" sourcetype="_json"
| eval GroupType=mvindex('additionalDetails{}.value', mvfind('additionalDetails{}.key', "GroupType"))
| where GroupType="DynamicMembership"
| eval formatted_output = if(GroupType="DynamicMembership", "===============================
targetResources:
- displayName: " + mvindex('targetResources{}.displayName', 0) + "
type: " + mvindex('targetResources{}.type', 0) + "
modifiedProperties:
- displayName: MembershipRule
oldValue: " + mvindex('targetResources{}.modifiedProperties{}.oldValue', 0) + "
@rezamt
rezamt / Check CSV.ps1
Last active May 2, 2025 02:00
GPOCheck
$gpoList = Get-CsvData -FilePath "gpo-data.csv"
$gpoList| foreach {
$gpo = Get-GPO -Guid $_.ID
# Write-Output "$($gpo.Id),$($gpo.DisplayName),$($gpo.Owner)"
$gpo
}

Lookup invalid Authenication Method

| makeresults count=6
| streamstats count as _n
| eval method=case(
    _n=1,"Windows Hello for Business",
    _n=2,"Microsoft Authenticator push",
    _n=3,"Pincode",
 _n=4,"Microsoft Authenticator push",
@rezamt
rezamt / README.md
Created April 2, 2025 11:47
Workload Identity

https://nicolasuter.medium.com/why-you-should-use-entra-workload-identity-federation-dfe8b6b626a1

When can I use Workload Identity Federation?

Which scenarios support “Workload identity Federation”?

  • Workloads running on any Kubernetes cluster (Azure Kubernetes Service (AKS), Amazon Web Services EKS, Google Kubernetes Engine (GKE), or on-premises)
  • GitHub Actions (CI / CD Pipelines) [2]
  • GitLab (CI / CD Pipelines) [3]
  • Workloads / VMs Google Cloud
  • Workloads / VMs running in Amazon Web Services (AWS)
@rezamt
rezamt / RSA - Reference
Created October 8, 2024 00:16
RSA reference architecture
# Framework
# Reference Architecture
https://www.youtube.com/watch?v=1fjXNfIysbg&t=2612s
@rezamt
rezamt / README.md
Created October 1, 2024 13:29
SAML Signing Benefits

Enforcing signed SAML authentication requests offers several key benefits:

Enhanced Security:

By requiring signed requests, you ensure that the authentication requests are coming from a trused source. This helps prevent unauthorized access and reduces the risk of man-in-the-middle attacks1.

Data Integrity:

Signed requests guarantee that the data within the authentication request has not been tampered with during transmission. This ensures the integrity of the authentication process1.

Compliance:

Many regulatory frameworks and security standards require the use of signed authentication requests to ensure secure data exchange. Enforcing signed requests helps organizations meet these compliance requirements1.

@rezamt
rezamt / risk.md
Created September 30, 2024 03:19
opai
  1. Data Privacy: Understand what type of data Copilot is accessing. Does it have access to sensitive, personal, or confidential information (like customer data, codebases, or proprietary documentation)? Review the privacy policies and how your data is stored, transmitted, and used.
  2. Permission Levels: Ensure that Copilot is operating under the principle of least privilege, meaning it should only access the minimum amount of data necessary for its function. Verify that user roles and permissions are well-defined and properly implemented.
  3. Data Retention and Usage: Look into how long Copilot retains your data and for what purpose. Make sure the retention policies align with your organization’s compliance and data protection requirements. Can you delete or anonymize the data if necessary?
  4. Security Protocols: Evaluate the security measures in place. Does Copilot use encryption (both in transit and at rest)? What security frameworks and standards does it follow (e.g., SOC 2, ISO 27001)?
  5. Audit and Monitor
@rezamt
rezamt / yamlconfig.md
Created September 8, 2024 10:13
poweshell

Read YAML and generate Markdown

param( [Parameter(Mandatory=$true)] [string]$YamlFilePath,

[Parameter(Mandatory=$true)]
[string]$OutputMarkdownPath

)

@rezamt
rezamt / swagger.yaml
Created November 15, 2023 22:07
Application Factory
openapi: 3.0.3
info:
title: Microsoft Azure Application Onboarding Factory - OpenAPI 3.0
description: |-
Microsoft Azure Application Onboarding Factory Platfomr API
termsOfService: http://swagger.io/terms/
contact:
email: [email protected]
version: 0.1.0
externalDocs:
@rezamt
rezamt / main.py
Created November 14, 2023 12:28
Filter Credentials
# This is a sample Python script.
import json
import re
message = {
"items": [
{
"clientId": "<string>",
"grantTypes": [
"REFRESH_TOKEN",