Advanced (업데이트: 2026. 7. 19.)

소규모 제작사의 Entra ID 권한 리뷰

Claude Code로 퇴사자, 공유 계정, 그룹, 앱, Entra ID 로그를 점검합니다.

소규모 제작사의 Entra ID 권한 리뷰

소규모 제작사에서는 Microsoft 365 접근 권한이 프로젝트보다 오래 남는 일이 많습니다. 디자이너는 퇴사했지만 SNS 공유 계정은 살아 있고, 클라이언트 게스트는 Teams에 남아 있으며, 예전 관리자 역할은 아무도 건드리지 않습니다. 먼저 볼 화면은 Entra ID 사용자 목록, 그룹, 앱, sign-in logs, audit logs입니다.

Key Points

  • 사용자, 그룹, 앱, 공유 계정, 게스트, 역할을 나눠 봅니다.
  • Access reviews는 그룹과 앱 접근을 정기적으로 확인하는 데 쓸 수 있습니다.
  • Audit logs와 sign-in logs는 변경과 최근 사용을 보여줍니다.
  • Claude Code는 표를 만들고, 사람은 조치를 승인합니다.
  • 남은 퇴사자 계정, owner 없는 공유 계정, 오래된 그룹, 검토 시간을 봅니다.

Workflow: Build The Review Table First

먼저 퇴사일, accountEnabled, 그룹, 앱, 역할, owner, 마지막 로그인으로 표를 만듭니다. Claude Code에 주기 전 이름, 이메일, 클라이언트명은 샘플 ID로 바꿉니다.

SourceReview fieldHuman decision
Usersleave date, accountEnabled, departmentHR status and exceptions
Groupsowner, guests, project endclient access and contract
Enterprise appsassignment, shared account, rolebusiness need and license
Sign-in logslast activity, failuresleave, exception, or cleanup
Audit logswho changed whatapproval trail

Primary sources checked: access reviews, create access reviews, audit logs, sign-in logs, Lifecycle workflows, sharing accounts, and security defaults.

What Claude Code Does And What Humans Decide

Claude Code can clean an anonymized CSV, find enabled leavers, ownerless shared accounts, stale assignments, old privileged roles, and missing owners. Humans decide disablement, deletion, license removal, role removal, guest removal, shared-account replacement, and emergency-account policy.

3 Use Cases

Use case 1: Find enabled leavers

  • Input: user list, leave date, accountEnabled, groups, app assignments, last sign-in.
  • Output: enabled leavers, remaining groups, app assignments, review owner.
  • Human review: HR status, contractor continuation, mailbox retention, legal hold, approval.

Use Claude Code to prepare a candidate list. Do not let it delete accounts.

Use case 2: Review shared accounts

  • Input: shared account list, app name, owner, MFA, last sign-in, department.
  • Output: ownerless shared accounts, weak authentication, high permission, long-lived access.
  • Human review: whether to move to app assignment, SSO, or another managed pattern.

The first win is visibility: owner, app, authentication method, and review date.

Use case 3: Run monthly group cleanup

  • Input: groups, app assignments, owners, guests, last use, project end date.
  • Output: review target, owner message, keep reason, removal candidate, next review date.
  • Human review: client contract, project continuation, privileged role, audit needs.

Start with client-share groups, external guests, and admin roles.

Copy-Paste Prompt

Act as a Microsoft Entra ID access review assistant for a small agency.
Prepare a human-review table for leavers, shared accounts, stale groups, guests, and privileged roles.

Check enabled leavers, ownerless shared accounts, weak shared-account authentication, unused assignments, stale privileged accounts, and groups with guests.
Never issue deletion or disable commands.
Use anonymized IDs only.
Return the five rows to inspect today.

Working Check Code

// verify-entra-access-review.mjs
// No dependencies. Run with: node verify-entra-access-review.mjs
const accounts = [
  {
    userPrincipalName: "[email protected]",
    department: "design",
    employeeLeaveDate: "2026-06-30",
    accountEnabled: true,
    lastSignInDaysAgo: 2,
    groups: ["client-a-share", "figma-admin"],
    roles: [],
    mfa: true,
    owner: "manager-01"
  },
  {
    userPrincipalName: "[email protected]",
    department: "marketing",
    employeeLeaveDate: null,
    accountEnabled: true,
    lastSignInDaysAgo: 1,
    groups: ["social-media-tools"],
    roles: [],
    mfa: false,
    owner: ""
  },
  {
    userPrincipalName: "[email protected]",
    department: "it",
    employeeLeaveDate: null,
    accountEnabled: true,
    lastSignInDaysAgo: 120,
    groups: [],
    roles: ["Global Administrator"],
    mfa: false,
    owner: "it-lead"
  }
];

const problems = [];
const today = new Date("2026-07-19T00:00:00Z");

for (const account of accounts) {
  if (account.employeeLeaveDate && new Date(account.employeeLeaveDate + "T00:00:00Z") < today && account.accountEnabled) {
    problems.push({ account: account.userPrincipalName, item: "leaver still enabled", fix: "disable account or run the approved offboarding workflow" });
  }
  if (account.userPrincipalName.includes("shared") && !account.owner) {
    problems.push({ account: account.userPrincipalName, item: "shared account owner", fix: "assign an accountable owner and review app assignment" });
  }
  if (account.userPrincipalName.includes("shared") && !account.mfa) {
    problems.push({ account: account.userPrincipalName, item: "shared account MFA", fix: "replace direct password sharing with controlled app access or strong authentication" });
  }
  if (account.roles.length > 0 && account.lastSignInDaysAgo > 90) {
    problems.push({ account: account.userPrincipalName, item: "stale privileged account", fix: "review role need, sign-in logs, and break-glass policy" });
  }
  if (account.groups.length > 0 && account.lastSignInDaysAgo > 30) {
    problems.push({ account: account.userPrincipalName, item: "group access review", fix: "ask the group owner to approve, deny, or remove access" });
  }
}

if (problems.length > 0) {
  console.table(problems);
  process.exitCode = 1;
} else {
  console.log("Entra ID access review checklist passed.");
}

Pitfall: Common Failure Cases

The first failure is using last sign-in as the only signal. Add leave date, owner, role, exception, and approval. The second failure is leaving shared accounts ownerless. The third failure is reviewing users but missing groups. The fourth failure is letting AI decide deletion. Claude Code prepares candidates; humans approve changes.

FAQ

Q. What should a small team review first?

A. Enabled leavers, ownerless shared accounts, and stale privileged accounts.

Q. Are access reviews only for large companies?

A. No. Start with client-share groups, guests, and privileged roles.

Q. Can shared accounts remain?

A. Sometimes, but owner, app purpose, authentication method, and review date must be visible.

Q. Can Claude Code read real logs?

A. Use anonymized CSV data. Do not include real names, emails, client names, phone numbers, or contracts.

Training And Consultation Signal

Measure enabled leavers, ownerless shared accounts, stale groups, guests, review time, and inquiry rate. If those numbers hurt, Entra ID review operations are a fit for ClaudeCodeLab training.

What I Verified

I checked Microsoft Learn references for access reviews, audit logs, sign-in logs, Lifecycle workflows, shared accounts, and security defaults. I also checked the CTA, executable JavaScript, internal link, external links, locale coverage, and queue removal.

#claude-code #제작사 #entra-id #access-review #offboarding
무료

무료 PDF: Claude Code 치트시트

이메일을 입력하면 명령, 리뷰 습관, 안전한 워크플로를 정리한 PDF를 받을 수 있습니다.

개인정보를 안전하게 관리하며 스팸을 보내지 않습니다.

Masa

작성자 소개

Masa

Claude Code 실무 워크플로와 팀 도입을 검증하는 엔지니어입니다.