Zero Trust Entra ID

cloudconsulting.agustin


💻🔥🔰 ZERO TRUST ✅ A browsable checklist applicable to Microsoft Entra ID (Azure AD) & IAM security activities 🔻


💻 ENTRA ID ROLES 📂
💻 Privileged Identity Management (PIM) 📂
💻 Conditional Access (CA) 📂
💻 DEPLOY BASELINE ENTRA ID 📂
💻 CLEAN-UP STALE ACCOUNTS 📂
💻 HARDEN APP REGISTRATIONS 📂
💻 ENTRA PASSWORD PROTECTION 📂


💠 Entra ID roles : Configure, harden, and clean-up  (built-in & custom) following the principle of least privilege. >


Entra ID roles : Configure, harden, and clean-up  (built-in & custom) following the principle of least privilege.

Overview

A practical, auditable workflow to configure, harden, and clean up Microsoft Entra ID roles that enforces least privilege:
Discover current assignments, reduce built-in role use, create scoped custom roles when needed, require just-in-time (JIT) activation,
apply approval and MFA guards, remove stale or unused assignments, and document everything for audit and operations.


🔸 1. Preparatory discovery and planning


🔸 2. Hardening actions (technical controls)


🔸 3. Cleanup actions (remove stale or risky configurations)


🔸 4. Operationalize least privilege (process and governance)


🔸 5. Example actionable custom-role creation guidance


🔸 6. Step-by-step Azure portal click path to perform key tasks

🞛 6.1 Export and review role assignments

  1. Portal: Sign in to the Azure portal.
  2. Click Microsoft Entra ID (or Azure Active Directory) in the left nav.
  3. Click Roles and administrators.
  4. To export assignments: open a role (e.g., Global Administrator) then click Role assignments, then click Download or Export (if available) to get a CSV.

🞛 6.2 Convert direct assignments to group-based assignments

  1. Portal: Microsoft Entra ID > Roles and administrators.
  2. Select the role to change.
  3. Click Add assignment.
  4. In Add assignment, choose Group as the assignee type, search and select the security group, set the Scope if prompted, then click Add.
  5. After group assignment is active, remove direct user assignments: in the role’s Role assignments list select the user, click Remove.

🞛 6.3 Configure Privileged Identity Management (PIM) for roles

  1. Portal: Microsoft Entra ID > Privileged Identity Management (PIM).
  2. Click Microsoft Entra roles.
  3. Click Manage > Roles or find a specific role and click it.
  4. For a role, click Add assignments and choose Eligible (not Permanent), select the user or group, set Assignment settings: require MFA, require approval,
    set Max activation duration, then click Assign.
  5. Under Role settings (within PIM), configure Require approval to activate, Activation email notifications, and Multi-factor authentication.

🞛 6.4 Create a custom role

  1. Portal: Microsoft Entra ID > Roles and administrators.
  2. Click + New custom role.
  3. Provide Name and Description.
  4. Under Permissions, click Add permissions, search the exact actions required, select them, and click Add.
  5. Set Assignable scopes (tenant or specific scopes), then click Create.
  6. Assign the custom role using Add assignment and prefer group eligibility or PIM.

🞛 6.5 Configure Conditional Access for role activation or portal sign-in

  1. Portal: Microsoft Entra ID > Security > Conditional Access.
  2. Click + New policy.
  3. Name policy, under Users or workload identities pick the privileged role group or specific users.
  4. Under Cloud apps or actions, select Microsoft Entra admin center or Sign-in risk as needed.
  5. Under Grant, choose Require multi-factor authentication and any additional controls (e.g., require hybrid Azure AD joined device).
  6. Enable policy and click Create.

🞛 6.6 Run an access review for role/group membership

  1. Portal: Microsoft Entra ID > Identity Governance > Access reviews.
  2. Click + New access review.
  3. Choose Review type (Group or Role), select the role or group to review, set reviewers and recurrence, then Start.
  4. Monitor review results and apply removals after completion.

🞛 6.7 Remove stale or unused service principals and APP permissions

  1. Portal: Microsoft Entra ID > Enterprise applications or App registrations.
  2. Filter by Last sign-in or check the application’s Activity.
  3. For unused items: open the app, on the overview page click Delete to remove registration, or under Certificates & secrets rotate or remove secrets.
  4. For application permissions: open API permissions, remove unnecessary permissions, and click Grant admin consent only when needed.

🞛 6.8 Audit and logging configuration

  1. Portal: Microsoft Entra ID > Monitoring > Audit logs or Sign-ins.
  2. Use Export Data Settings to route logs to Log Analytics, Event Hub, or Storage account for long-term retention and SIEM ingestion.
  3. In PIM: Privileged Identity Management > Activity to review activation logs and export as needed.

🞛 Quick checklist to apply immediately

🞛 Closing operational notes


🏠 TOP ^

💠 Privileged Identity Management (PIM) : Configure, harden, maintain, clean-up of assignments


Overview

Privileged Identity Management (PIM) provides just-in-time, time-bound, and approval-backed elevation for Microsoft Entra roles (Azure AD roles) and Azure resource roles (Azure roles) 
it reduces standing administrative privileges and captures activation audit trails for governance and compliance.

Preparatory discovery and planning


🔸 7. Configure and harden PIM — Steps and actions

  • 🞛 7.1 Enable and onboard PIM for Microsoft Entra roles (Azure AD roles) and Azure resource roles (Azure roles)
  • 🞛 7.2 Convert permanent assignments to eligible assignments
  • 🞛 7.3 Configure role settings per role
  • 🞛 7.4 Require approval workflows where needed
  • 🞛 7.5 Limit activation scope and session controls
  • 🞛 7.6 Harden service principals and eligible groups
  • 🞛 7.7 Enable alerts, notifications, and email justification retention
  • 🞛 7.8 Automate policy enforcement

  • 🔸 8. Maintain PIM and regular cleanup actions

  • 🞛 8.1 Scheduled access reviews
  • 🞛 8.2 Review and remove stale or unused eligibilities
  • 🞛 8.3 Audit activation patterns and anomalous behavior
  • 🞛 8.4 Clean up orphaned and legacy assignments
  • 🞛 8.5 Revalidate approval chains and approvers
  • 🞛 8.6 Test and exercise emergency (break-glass) process
  • 🞛 8.7 Reporting and compliance evidence

  • 🔸 9 Step-by-step Azure Portal actions (where to click)

  • 🞛 9.1 Enable and access PIM
  • 🞛 9.2 Convert a permanent assignment to eligible
  • 🞛 9.3 Assign a role to a group as eligible
  • 🞛 9.4 Configure role settings (MFA, approval, duration)
  • 🞛 9.5 Require approval workflow
  • 🞛 9.6 Configure conditional access for activation
  • 🞛 9.7 Set alerts and notifications
  • 🞛 9.8 Run access reviews
  • 🞛 9.9 Export logs and route to SIEM
  • 🞛 9.10 Clean up stale assignments

  • 🞛 Quick prioritized checklist (immediate actions)

    📕 Privileged Identity Management (PIM) can be linked to Conditional Access (CA) Policies via Authentication Contexts

    📕 Privileged Identity Management (PIM) Applies to Entra Roles, Azure Roles and Groups.
    📕 Privileged Identity Management (PIM) enables Justifications, Approvals, MFA and Authentication Contexts for Conditional Access (CA) Policies
    📕 Conditional Access Gaps can be evaluated via Entra Portal > Monitoring & Health > Workbooks > Conditional Access Gap Analyzer | Log Analytics workspace Logs Query
    📕 Conditional Access also permits to create CA Policies combining Authentication Flow Conditions to select Device Code Flow or Authentication transfer


    🏠 TOP ^

    💠 Conditional Access : Configure, harden, clean-up policies in alignment with security standards


    🔸 10. Conditional Access Policies — Configure, Harden, and Clean Up

    🔸 10.1 Goals and principles


    🔸 10.2. Preparatory discovery and planning


    🔸 10.3. Core configuration and hardening actions


    🔸 10.4. Clean-up and continuous maintenance


    🔸 10.5. Risk mitigation and monitoring


    🔸 10.6. Step-by-step Azure Portal actions and where to click

    🞛 10.6.1 Open Conditional Access

    1. Azure portal > Microsoft Entra ID > Security > Conditional Access.

    🞛 10.6.2 Inventory and export current policies

    1. Conditional Access blade > Policies > review list.
    2. For each policy: click policy name > Overview > record Assignments and Access controls.
    3. Use Activity > What If (Conditional Access) to simulate impact for specific users/apps.

    🞛 10.6.3 Create a new targeted policy (example: require MFA for admin portal)

    1. Conditional Access > + New policy > Create new policy.
    2. Name the policy Require MFA for Admin Portal.
    3. Under Assignments > Users or workload identities > Select users and groups > choose specific admin group(s).
    4. Cloud apps or actions > Select apps > choose Microsoft Entra admin center or specific admin apps.
    5. Conditions > set Locations > include/exclude named locations as needed; set Device platforms or Client apps if required.
    6. Access controls > Grant > select Require multi-factor authentication and optionally Require device to be marked as compliant.
    7. Enable policy > set to Report-only for initial testing, then On when validated.
    8. Click Create.

    🞛 10.6.4 Block legacy authentication

    1. Conditional Access > + New policy > name Block Legacy Authentication.
    2. Assignments > Users or workload identities > choose All users (exclude break-glass group).
    3. Cloud apps or actions > All cloud apps.
    4. Conditions > Client apps > select Configure > check Other clients (Legacy authentication protocols).
    5. Access controls > Grant > Block access.
    6. Set Enable policy to On after testing in report mode.
    7. Click Create.

    🞛 10.6.5 Create app-specific device compliance policy

    1. Conditional Access > + New policy > name Require compliant device for Sensitive App.
    2. Assignments > Users or workload identities > select targeted user groups.
    3. Cloud apps or actions > select the specific sensitive application.
    4. Conditions > Device platforms > select platforms as needed.
    5. Access controls > Grant > Require device to be marked as compliant and Require multi-factor authentication.
    6. Use Report-only first, then On.
    7. Click Create.

    🞛 10.6.6 Use What If tool to validate impact

    1. Conditional Access > What If > enter User, select Applications, Location, Client app, and run simulation.
    2. Review which policies would apply and whether access would be granted or blocked.

    🞛 10.6.7 Convert enforcement after testing

    1. Conditional Access > open policy > Overview > switch Enable policy from Report-only to On.
    2. Monitor sign-in logs and Conditional Access insights for errors.

    🞛 10.6.8 Clean up policies

    1. Conditional Access > Policies > sort or filter by Last modified or review policy hit counts in Insights.
    2. Open a candidate policy > verify no recent hits or owners > click Delete to remove unused policies.
    3. For consolidation: edit policy > adjust Assignments and Access controls, then delete redundant policy.

    🞛 10.6.9 Configure logging and alerts

    1. Microsoft Entra ID > Monitoring > Sign-ins > use filters to view Conditional Access results.
    2. Export diagnostics: Microsoft Entra ID > Diagnostic settings > send Audit and Sign-in logs to Log Analytics, Event Hub, or Storage account.
    3. In Log Analytics create queries and alerts for high deny rates or policy changes.


    🞛 Quick checklist to apply immediately

    📕 Privileged Identity Management (PIM) can be linked to Conditional Access (CA) Policies via Authentication Contexts

    📕 Privileged Identity Management (PIM) Applies to Entra Roles, Azure Roles and Groups.
    📕 Privileged Identity Management (PIM) enables Justifications, Approvals, MFA and Authentication Contexts for Conditional Access (CA) Policies
    📕 Conditional Access Gaps can be evaluated via Entra Portal > Monitoring & Health > Workbooks > Conditional Access Gap Analyzer | Log Analytics workspace Logs Query
    📕 Conditional Access also permits to create CA Policies combining Authentication Flow Conditions to select Device Code Flow or Authentication transfer



    🏠 TOP ^

    💠 Deploy Baseline Entra hardening restrictions and controls : Follow Microsoft best practices and industry benchmarks.


    Overview

    Deploy a baseline Entra hardening posture that enforces least privilege, defends identity as the primary control plane,
    and maps to Microsoft guidance and industry benchmarks(CIS, Azure Well-Architected) to produce an auditable, repeatable configuration.

    🔸 11. Preparatory discovery and planning


    🔸 12. Baseline controls and why each matters


    🔸 13. Implementation steps and actions (high level)

    1. Pilot and enable telemetry: enable diagnostic export for Audit and Sign-ins to Log Analytics or Event Hub; validate ingestion and queries for key signals.
    2. Enforce strong auth: configure Conditional Access policies to require MFA/passwordless for admins and privileged groups; test in Report-only, then enforce.
    3. Onboard PIM and remediate assignments: enable PIM for Microsoft Entra roles (Azure AD roles) and Azure resources (Azure roles);
      convert permanent assignments to Eligible, require justification, approval, and MFA for Critical roles.
    4. Replace direct assignments with groups and scoped custom roles: create security groups for role responsibilities and author custom roles with minimal actions and assign at narrow scopes.
    5. Lock down app registrations and permissions: disable self-service app registration and restrict which users can consent to apps, review existing app permissions and remove excessive Graph or tenant-wide rights.
    6. Secure automation principals: audit service principals, remove inactive ones, reduce application permissions to the minimum, rotate secrets or replace with certificates or managed identities.
    7. Block legacy auth and enforce device posture: create a Conditional Access policy to block legacy auth and require device compliance for sensitive apps.
    8. Run access reviews and periodic certification: schedule quarterly access reviews for high-impact roles and monthly checks for stale eligibilities and unused service principals.
    9. Document and operationalize: maintain runbooks, naming standards, owner lists, and an approval flow for role elevation and policy changes for auditability.


    🔸 14. Cleanup and continuous maintenance


    🔸 15. Step-by-step Azure Portal actions (where to click)

    1. Microsoft Entra ID > Identity Governance > Access reviews > + New access review > choose Review type (Role or Group) > select target > set reviewers and recurrence > Create.
    2. Implement automation by scripting Graph API queries for assignments and integrating with Logic Apps/Runbooks to enforce remediation (use your existing automation pipelines).



    🏠 TOP ^

    💠 Clean-up stale IDs, orphaned accounts and objects within the Entra ID tenant


    Summary: Steps to discover, clean up, and prevent stale or orphaned accounts and objects in your Entra tenant, plus exact Azure Portal click paths to identify and remediate them.

    🔸 16. Clean-up Account Candidates discovery, validation, safe removal or remediation, prevention, and monitoring.

    🞛 16.1. Discover and inventory stale or orphaned objects


    🞛 16.2. Validate before removing (safety and audit)


    🞛 16.3. Remediation actions (remove or remediate safely)


    🞛 16.4. Prevent recurrence (guardrails and automation)


    🞛 16.5. Monitoring, reporting, and governance


    🔸 17. Step-by-step Azure Portal actions (where to click)

    🞛 17.1 Find disabled, inactive, or stale users

    1. Azure portal > Microsoft Entra ID > Users.
    2. Use filters: Block sign-in = Yes or filter by User type (Guest) and export list.
    3. To check activity: open Users > select user > Sign-ins (on the left) to view last interactive activity.
    4. To block (soft-remove): user page > Profile > Block sign-in > set to Yes > Save.
    5. To delete (after validation): user page > Delete > confirm.

    🞛 17.2 Detect and review service principals and app registrations

    1. Azure portal > Microsoft Entra ID > App registrations.
    2. Use All applications view, sort or filter by Owner or Created date; open candidate app > Authentication and Certificates & secrets to inspect credentials.
    3. Check usage: Microsoft Entra ID > Enterprise applications > select the app > Sign-in logs to see usage.
    4. To disable or remove secret: app page > Certificates & secrets > Remove secret or add new cert; to delete app: app page > Delete.
    5. If app has enterprise application mapping, open the Enterprise application and use Properties > set Enabled for users to sign in to No (quarantine) before deletion.

    🞛 17.3 Identify and remove orphaned role assignments

    1. Azure portal > Subscriptions (or specific resource group/resource) > open scope > Access control (IAM).
    2. Click Role assignments > use Filter for Principal type = Service principal or Show assignments for = Deleted principals (if shown) or scan for entries with missing principal details.
    3. Select orphaned assignment(s) and click Remove to delete the assignment.
    4. For broad discovery across subscription(s): Azure portal > Azure Active Directory > Roles and administrators > check role assignment lists for principals that no longer resolve.

    🞛 17.4 Handle synced/orphaned AD-Connect objects

    1. Azure portal > Microsoft Entra ID > Users > open suspected synced user > check Source property (shows Azure AD or Windows Server AD).
    2. If Source = Windows Server AD, do not delete in cloud; investigate on-premises AD or Azure AD Connect sync rules. Use on-prem AD to delete or fix anchor attributes, then allow sync to remove cloud object.
    3. If a synced object is in an inconsistent state, consult Azure AD Connect health and the on-prem AD admins before making deletions.

    🞛 17.5 Cleanse managed identities and their role assignments

    1. Azure portal > Virtual machines or service resource where managed identity was created > open resource > Identity > check if system-assigned identity exists.
    2. If resource deleted but identity persists as user-assigned: Azure portal > Managed Identities (or Resource groups > search) > open identity > Overview and Role assignments and remove assignments or delete identity.

    🞛 17.6 Export reports and create quarantine/review groups

    1. Many lists support Download or Export (CSV) from Users, App registrations, Enterprise applications, and Role assignments blades—use export to feed ticketing and review.
    2. Create a security group named Orphaned-Quarantine or similar: Microsoft Entra ID > Groups > + New group > add accounts flagged for review. Use an access review for the group before final deletion.

    🞛 17.7 Configure recurrent scans and alerts (portal steps to start)

    1. Azure portal > Microsoft Entra ID > Monitoring > Audit logs / Sign-ins > click Export Data Settings to send logs to Log Analytics or Event Hub.
    2. In Log Analytics workspace create saved queries to find no-activity principals and orphaned role assignments; configure alerts from queries to create work items automatically.


    🞛 Quick prioritized checklist


    🏠 TOP ^

    💠 Harden and clean-up Application registrations


    Summary: Identify and remediate high-risk APP permissions, ensure only authorized individuals can register APPs, restrict or disable user-consent as needed,harden guest user access, clean-up.

    🔸 18 Application Registration Hardening and Cleanup — Steps and Actions

    🞛 18.1. Inventory and risk classification

    🞛 18.2. Restrict who can register apps and control consent

    🞛 18.3. Harden app permissions and consent

    🞛 18.4. Secure credentials and authentication methods

    🞛 18.5. Enforce app ownership and lifecycle controls

    🞛 18.6. Harden guest user access and app exposure

    🞛 18.7. Continuous monitoring and automation


    🔸 19. Azure Portal Click Path to Harden and Clean Up App Registrations

    🞛 19.1. Inventory app registrations and service principals

    1. Azure portal > Microsoft Entra ID > App registrations > choose All applications to view registrations.
    2. For service principal view: Microsoft Entra ID > Enterprise applications > All applications.
    3. Use Download or Export on lists to CSV for offline analysis.

    🞛 19.2. Review app usage and permissions

    1. Enterprise applications > select application > Sign-in logs to check last activity.
    2. Open the app > Permissions or API permissions to inspect delegated and application permissions.
    3. Open Owners on the app page to see and edit owners.

    🞛 19.3. Quarantine or disable suspect apps

    1. Enterprise applications > select app > Properties > set Enabled for users to sign in to No > Save.
    2. For app registrations: App registrations > select app > Authentication or Certificates & secrets > remove secrets or set to expire; then disable service principal sign-in under Enterprise applications if needed.

    🞛 19.4. Remove or reduce permissions and revoke consent

    1. App registrations > select app > API permissions > remove unnecessary scopes > click Save.
    2. Enterprise applications > select app > Permissions or User consent > Revoke user consent or Consent and permissions > remove admin consent where inappropriate.

    🞛 19.5. Rotate and remove credentials

    1. App registrations > select app > Certificates & secrets > New client secret to rotate, then Remove old secrets when new is active.
    2. Prefer certificates: Certificates & secrets > Upload certificate and remove client secrets.

    🞛 19.6. Restrict who can register apps and consent

    1. Microsoft Entra ID > User settings > App registrations > set Users can register applications to No > Save.
    2. Microsoft Entra ID > Enterprise applications > Consent and permissions > configure User consent settings to restrict which users can consent to apps;
      choose Do not allow user consent or Allow specific users/groups.

    🞛 19.7. Assign and enforce app owners

    1. App registrations > select app > Owners > Add owners to assign responsible individuals or groups.
    2. Use Groups for ownership: Microsoft Entra ID > Groups > add group as owner on app to ensure continuity.

    🞛 19.8. Clean up unused APP registrations and service principals

    1. App registrations > filter or sort by Created date or use exported sign-in data to find no-activity apps.
    2. For each candidate: App registrations > select app > Delete or Enterprise applications > set Enabled for users to sign in to No and after quarantine delete.
    3. Document deletion actions in a ticket or change log for audit.

    🞛 19.9. Harden guest access to apps

    1. Microsoft Entra ID > Users > External collaboration settings > reduce guest permissions and set collaboration restrictions.
    2. Microsoft Entra ID > Identity Governance > Access reviews > + New access review > choose Groups or applications > select guest-facing apps or groups and schedule review; remove guests who fail review.

    🞛 19.10. Monitor and alert on app changes

    1. Microsoft Entra ID > Monitoring > Audit logs > filter for Application created, Permission granted, or Consent events.
    2. Click Export Data Settings on Audit logs to send to Log Analytics or Event Hubs for automated alerting and SIEM integration.


    🞛 Immediate prioritized checklist


    🏠 TOP ^

    💠 Deploy Entra Password Protection across in-scope tenants and corresponding on-prem components : ensure consistent password protections across AD and Entra.


    🔸 20. Deploy Entra Password Protection — Steps and actions

    🞛 20.1. Plan scope, prerequisites, and licensing

    20.2. Inventory and baseline

    20.3. Deploy on-prem components (DC agent + Proxy)

    20.4. Configure banned password lists and custom terms

    20.5. Enable enforcement modes and pilot

    20.6. Harden around exceptions and special accounts

    20.7. Operationalize and maintain

    Key rationale and risk notes


    21. Azure Portal and on-prem click-paths (where to click)

    21.1. Prepare tenant settings and custom banned list

    1. Azure portal > Microsoft Entra ID > Security > Authentication methods > Password protection.
    2. Under Password protection: review Password protection mode and Custom banned passwords; click Edit to upload or paste your custom list and Save (start in detection/audit first).

    21.2. Download on-prem components and review requirements

    1. Microsoft Learn article and docs (portal link from Password protection page) provide download links and prerequisites for the DC agent and proxy; follow link to download the installer and schema/privilege requirements.

    21.3. Install and configure the Password Protection proxy

    1. On a management server: run the proxy installer; after install open the Proxy configuration UI or use the provided PowerShell/CLI registration commands.
    2. Portal: Microsoft Entra ID > Security > Authentication methods > Password protection > note the Tenant ID and registration instructions; use these values when registering the proxy with your tenant.
    3. Verify the proxy shows healthy status in your server logs and in the proxy diagnostic output.

    21.4. Install DC agent(s) on domain controllers

    1. On each chosen domain controller: run the Microsoft Entra Password Protection DC agent installer.
    2. After install, validate agent connectivity to the proxy and that the agent can fetch the banned list; check the agent’s event logs for successful operations and metric outputs.

    21.5. Validate and switch modes (Audit → Enforce)

    1. Azure portal > Microsoft Entra ID > Security > Authentication methods > Password protection > under Mode, set to Audit to collect telemetry first and Save.
    2. Monitor agent and proxy logs for rejected attempts and false positives for your pilot OUs for the chosen window.
    3. After validation, return to the portal and set Mode to Enforce for the tenant or for targeted scope and Save.

    21.6. Monitor logs and route telemetry

    1. Azure portal > Microsoft Entra ID > Monitoring > Audit logs / Sign-ins to view related events; click Export Data Settings or Diagnostic settings to send Password Protection and AD agent logs to Log Analytics or Event Hub for SIEM ingestion and alerting.
    2. In Log Analytics run saved queries to surface blocked password attempts, proxy errors, or spikes in password change failures.

    21.7. Manage exceptions and updates

    1. Portal: Authentication methods > Password protection > Custom banned passwords > edit to add or remove terms based on observed false positives.
    2. For an urgent rollback: disable the proxy registration on the server or set Mode back to Audit in the portal while troubleshooting.


    Quick checklist to apply immediately


    🏠 TOP ^



    cloudconsulting.agustin