## TL;DR
Calendar invites carry links in several body representations at once, and a chain that redirects through a tracker into a meeting or event page gives the rewriter two chances to fail: miss the link in the calendar part, or follow the chain only partway. Compare the invite raw parts with what the recipient client shows, test the chain hop by hop, and adjust policy so calendar links are either fully processed or deliberately excluded for known platforms.

```text
url rewriting failed for nested redirect in calendar invite
```

## Use this when
- Links in calendar invites behave differently from the same links in plain mail.
- An invite link lands on an intermediate tracker page instead of the final destination.

## Not for this skill when
- The invite is a phishing lure with a redirect chain. Analyse it as a phish, not a rewriting bug.
- All links in all formats fail to rewrite. That is a global policy fault.

## Steps
1. Save an affected invite in raw form and list every URL in its text and HTML parts. Verify: all link instances are enumerated.
2. Check which instances the recipient client renders and whether those are the rewritten ones. Verify: the rendered instance and its rewrite state are identified.
3. Follow the redirect chain manually in a safe tool and note each hop and the final page. Verify: chain length and final destination are known.
4. Check rewrite policy for calendar-originated mail and for the tracker domain in the chain, including any exclusions. Verify: the governing setting for this chain is found.
5. Send a test invite through the same path with a multi-hop link you control. Verify: the final destination opens correctly through the rewritten link.

## Variant phrasings
### calendar invite url rewriting nested redirect broken
The invite-specific variant.
### ics invite link not rewritten safe links
The format variant.

Compatibility: Defender Safe Links handling of calendar invites across Outlook clients.

## Why it happens
Invites are a separate mail format with duplicated content parts, and rewriting engines historically processed the message body more thoroughly than the calendar part. Attackers know this, so invite lures are also a real evasion route, which makes blind exclusion risky.

## Edge cases / pitfalls
- Test invites from external organisers, not only internal ones; the paths differ.
- A tracker hop that sets cookies can break when rewritten. That is a sender design issue to raise with the organiser.
- Keep detonation on for invite links from unknown senders even if known platforms are excluded.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_HaMSEjy6iZWrpn8OBoc4aw
