Skip to content

Conversation

@archiesaxenaa
Copy link

Change Description:

For the Bug : https://msazure.visualstudio.com/Microsoft%20Teams%20Extensibility/_workitems/edit/36076480/
Addressed the comment of this PR : #968

Root Cause

  1. DA projects return title IDs with T_ prefix (vs. U_ for traditional Office add-ins)
  2. Validation regex didn't recognize T_ prefix
  3. Add-in failed to uninstall.

Solution

To avoid fragile prefix-based logic, the code now:

  1. Extracts the manifest ID (final GUID) from any Title ID format using a flexible regex pattern
  2. Always uses --mode manifest-id with the extracted/provided manifest ID
  3. Eliminates prefix-specific pattern matching

Changes

  1. Updated uninstallWithTeams function in publish.ts:
  2. Modified regex logic to extract the last GUID from any Title ID format
  3. Changed to always use --mode manifest-id with the extracted/provided manifest ID
  4. Removed prefix-specific pattern matching that was causing failures with declarative agents

Do these changes impact command syntax of any of the packages? (e.g., add/remove command, add/remove a command parameter, or update required parameters)

No. The changes are internal to the uninstallWithTeams function in office-addin-dev-settings. No CLI commands, parameters, or their requirements have been modified. The function still accepts the same input (an add-in ID) and works with the same underlying atk uninstall command.

Do these changes impact documentation? (e.g., a tutorial on https://learn.microsoft.com/office/dev/add-ins/overview/office-add-ins)

No. The change is an internal bug fix.

Validation/testing performed:

Local Testing done via npm link.
Stop command now works for DA projects without errors or timeouts. Clean add-in un-installation when office app is closed and debug is stopped.

image

@archiesaxenaa archiesaxenaa requested a review from a team as a code owner January 6, 2026 04:44
Copy link
Collaborator

@millerds millerds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should change the callers of uninstallWithTeams to use the manifest id instead of the titleId so that becomes the primary path and the titleId case becomes a backup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants