Enric Díaz

Microsoft 365 / Entra ID Administrator

Barcelona, Spain

Microsoft 365 and Entra ID administration for a multi‑country tenant.

Identity, licensing and data governance for about 40,000 users in more than 40 countries. PowerShell and Microsoft Graph, with a dry run before every change.

~40,000
users in the tenant
40+
countries mapped
150+
PowerShell scripts written

01 — Selected work

Projects with measured outcomes

~60

expired credentials retired on the first pass

2026

Credential expiry notification for about 1,000 Entra ID app registrations

Problem
Client secrets and certificates on about 1,000 app registrations were expiring silently. An integration would stop working, a ticket would arrive days later, and nobody could say who owned the app or what it was for.
What I did
Inventoried every app and credential through Microsoft Graph and matched each credential against roughly a thousand sign-in records to separate "in use" from "forgotten". A Logic App now writes to the app owner at 30 and 7 days before expiry. Owners are mostly product owners, not engineers, and the raw configuration (permission scopes, redirect URIs, sign-in audience) does not tell them what will break. So the notice includes a plain-language summary of what the application does and what stops working if the credential lapses, generated by Azure OpenAI from configuration metadata only: permission names, redirect domains, whether the credential shows recent use. No secrets or tokens are sent; flags such as "involves user sign-in" are computed deterministically first, and the model returns strict JSON with a confidence score so low-confidence summaries are reviewed before sending. A companion script retires credentials expired for over 30 days; dry-run is the default.
Result
Owners receive a notice they can act on without a ticket to IT: renew, or confirm the app can be retired. The first clean-up pass found and retired around 60 credentials that had already expired, some by years.
  • Microsoft Graph
  • PowerShell
  • Logic Apps
  • Entra ID

~€60k

a year in reclaimable add-on seats, evidence attached

2026

Licence clean-up report: base licences and add-ons across 20+ countries

Problem
Base licences (F1, E3, Exchange Online) and paid add-ons (Copilot, Power BI Pro, Visio, Project, Planner) had been assigned over years and never reviewed. Country IT leads were asked to confirm who still needed what, with no data to answer. The add-ons alone came to about 900 seats, roughly €190,000 a year.
What I did
Built a per-country report that joins licence assignment, account liveness and per-app usage into four tiers — dormant, app unused, needs confirmation, keep — and carries a UsageSource column so "no usage recorded" is never mistaken for "no usage". Where Microsoft exposes no telemetry (desktop Visio and Project) I added an endpoint detector deployed through Intune. The clean-up script that follows is dry-run by default.
Result
Each country lead received one CSV and one figure per licence family. On the add-ons alone the report identified about 300 seats that can be reclaimed, roughly €60,000 a year, with the evidence for each seat on the same row.
  • Microsoft Graph
  • PowerShell
  • Entra ID
  • Intune

Read how this one went

~43,000

mailboxes behind the gateway

2026

Email security gateway migration for about 43,000 mailboxes

Problem
After a run of phishing and impersonation attempts that reached inboxes, the company decided the native mail filtering was not enough on its own and chose to put a dedicated gateway in front of Exchange Online.
What I did
Ran the proof of concept, then the migration. Mapped every mailbox to its country so the cost could be charged back correctly, inventoried the 120-plus accepted domains that had to be onboarded, verified the TLS posture of more than 200 partner domains before the MX cut-over, and tuned policies against real traffic after go-live.
Result
Mail for about 43,000 mailboxes in over 40 countries now passes through the gateway. The chargeback mapping also surfaced close to 7,000 users with no attributable country — found before the invoice, not after it.
  • Proofpoint
  • Exchange Online
  • Defender for Office 365
  • Microsoft Graph

02 — Case study

Licence usage report: correcting a false "unused" verdict on over 500 seats

The first version of the report came back with a clean, alarming number: about 340 Visio Plan 2 and 180 Project seats, over 500 in total, showed no usage at all. Reclaiming them would have been the easiest saving of the year. It was also wrong, and the reason it was wrong is the part worth telling.

Two omissions, one false conclusion

The usage data came from the Microsoft 365 usage reports in Graph, joined to licence holders by user principal name. Two settings had never been checked.

The first was a tenant privacy option, conceal user details in reports. With it switched on, Graph returns usage reports with hashed user names. The join on UPN silently matched nothing, and “no match” was being read as “no activity”. Nothing failed; the report simply had fewer rows than it should have, and no row said so.

The second was a limit in what Microsoft measures. The only cloud signal for Visio and Project is an Entra sign-in to the web app. Someone who opens Visio on their desktop every day, with a file from a network share, never produces that signal. For those two products, “unused” and “unmeasurable” looked identical.

What changed

Rather than patch the join and move on, the report gained a column: UsageSource. Every row now says where its usage verdict came from (usage report, sign-in log, endpoint telemetry, or not collected), so a reader can tell a confirmed dormant seat from a seat we simply cannot see yet.

For desktop Visio and Project, there is no API, so I wrote one. A small read-only script runs on the device through Intune Remediations and reads two local signals: the Office file MRU list and the Windows UserAssist launch counter. It returns a last-used date per app, which joins back to the licence holder. Device coverage is reported alongside, because a device the script never reached is not evidence either.

The number that survived

With the join fixed and the desktop signal added, the set of seats that can actually be reclaimed settled at about 300 across more than 20 countries, roughly €60,000 a year: a few dozen on dormant accounts, most with the application confirmed unused, the rest awaiting an owner’s confirmation. A further 300 or so seats remain marked usage unknown, and the report says so rather than folding them into either column.

Smaller than 500. Defensible to the person whose licence is being removed, which the first number was not.

03 — How I work

Working principles

  1. 01

    Dry run is the default, not an option.

    Every script that changes state takes an -Execute switch that is off unless you say otherwise, and the check runs before the first write and before it even authenticates. A preview you can read beats a confirmation you can click through.

  2. 02

    Absence of data is not evidence of absence.

    A report that could not load a source says "unknown", never "zero". Every conclusion carries the name of the source it came from, so a missing export is visible in the result instead of hidden inside a round number.

  3. 03

    A safeguard that trips falsely is worse than none.

    If an interlock fires every time, the operator learns to bypass it, and the bypass usually disables all of them at once. So safeguards are tested against real exports before they guard anything, and every privilege a script grants has its revocation written before it runs.

04 — About

Enric Díaz

Based in
Barcelona, Spain
Certified
SC-900Microsoft Certified: Security, Compliance, and Identity Fundamentals
Languages
Spanish and Catalan (native), English (C2)
Education
Higher Technician in Network Systems AdministrationEscola del Treball de Barcelona, 2012 – 2015
Microcomputer Systems and Networks TechnicianInstitut Joan d'Àustria, 2010 – 2012

Microsoft 365 administrator with responsibility for the Entra ID, licensing, mail-flow and data-governance layers of a multi-country organisation: about 40,000 users and an on-premises Active Directory with several forests synchronised through Entra Connect.

Previously technical lead for a Microsoft modern-workplace estate of 2,000+ devices (Intune, Defender, Purview) and, before that, consulting and tier-2 roles across Azure, Intune and Microsoft 365 for enterprise clients. Automation in PowerShell, Microsoft Graph and Logic Apps throughout.

  1. 2023 – 2026

    Workplace Technical Lead

    IESE Business School

    Global Microsoft 365 administration for workplace and security: Entra ID, Intune (Autopilot, MDM/MAM, compliance baselines, Autopatch) for 2,000+ Windows, macOS, iOS and Android devices; Defender for Endpoint, CrowdStrike Falcon and Darktrace; Purview DLP and retention; vendor and licence management.

  2. 2021 – 2023

    Modern Workplace & Microsoft Mobility Consultant

    Clevertask IT Solutions

    Microsoft modern-workplace deployments and identity integration across several enterprise clients; tier-2 support in regulated corporate environments (Active Directory, Microsoft 365, Citrix, SCCM, XenMobile); CMDB governance.

  3. 2017 – 2021

    L2 IT Technician & Asset Management Specialist

    Accenture, outsourced services for Almirall

    Tier-2 support in a regulated pharmaceutical environment; CMDB and IT asset lifecycle, leading a small operational team; mobility and infrastructure projects.

Identity
Entra ID · Conditional Access · Privileged Identity Management · Active Directory
Productivity & governance
Exchange Online · SharePoint Online · Teams · Purview
Automation
PowerShell · Microsoft Graph API · Logic Apps · Azure Automation
Endpoint & security
Intune · Defender for Office 365 · Proofpoint

05 — Contact

Get in touch

Open to conversations about identity, licensing and automation at scale. Email is the fastest way; LinkedIn works too.

or write to