Skip to content

Fix GDAP plan assignment for former guest users#7490

Closed
darjoo wants to merge 1 commit into
mainfrom
private/dajoo/612420-bcapps
Closed

Fix GDAP plan assignment for former guest users#7490
darjoo wants to merge 1 commit into
mainfrom
private/dajoo/612420-bcapps

Conversation

@darjoo
Copy link
Copy Markdown
Contributor

@darjoo darjoo commented Apr 1, 2026

Summary

  • Fixes ADO #612420: GDAP users who were previously guest users don't get the GDAP license updated
  • Removes two redundant early-exit conditions in AssignPlanToUserWithDelegatedRole (AzureADPlanImpl.Codeunit.al) that blocked plan re-assignment when a user's plan changed from guest to GDAP
  • Adds test GDAPUserWithPreviousGuestPlanGetsAccessUpdated verifying the fix

Root Cause

In AssignPlanToUserWithDelegatedRole, two early-exit checks (SkipUpdateUserAccess and HasPlans) prevented user access from being updated when a returning user's plan changed from guest to GDAP. Both were redundant because IsPlanAssignedToUser already prevents re-processing when the same plan is already assigned.

Test plan

  • New test: GDAPUserWithPreviousGuestPlanGetsAccessUpdated — verifies delegated admin with previous guest plan gets GDAP plan assigned
  • All existing Azure AD Plan tests pass (15 passed, 0 failed)

🤖 Generated with Claude Code

Fixes AB#612420

…ormer guest users

ADO #612420: [GDAP] GDAP user who were previously guest users in the environment, don't get the GDAP license and updated

Root Cause:
- In AssignPlanToUserWithDelegatedRole, two early-exit conditions (SkipUpdateUserAccess
  and HasPlans) prevented user access from being updated when a returning user's plan
  changed from guest to GDAP. Both were redundant because the IsPlanAssignedToUser check
  already prevents re-processing when the same plan is already assigned.

Changes:
- Removed `if SkipUpdateUserAccess then exit` check that blocked access updates for
  returning users whose plan genuinely changed
- Removed `if HasPlans then exit` check that was also redundant
- Removed unused `HasPlans` local variable

Test Coverage:
- Added GDAPUserWithPreviousGuestPlanGetsAccessUpdated test verifying that a delegated
  admin user with a previous guest plan gets the GDAP plan assigned and access updated
  even when SkipUpdateUserAccess = true
- Number of fix iterations: 2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant