Using XRef Links for Microsoft Learn API References
Using XRef Links for Microsoft Learn API References records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.
ReviewedEvidence1 sourceSectionWriting & Style
Quick answer
Use Microsoft Learn XRef links with an API type or member UID when linking to autogenerated API reference content; Microsoft recommends XRef because the links are build-validated and can survive reference URL changes.
Key details
Core Issueusing xref links for microsoft learn api references
RegisterMicrosoft Learn technical documentation
Important caveats
Scope Boundary
This page covers Microsoft Learn API-reference XRef links. It does not replace ordinary file or URL links for conceptual documentation that does not have an XRef UID.
Further guidance
Content
Use Microsoft Learn XRef links with an API type or member UID when linking to autogenerated API reference content; Microsoft recommends XRef because the links are build-validated and can survive reference URL changes.
Purpose
Keep Microsoft Learn source readable, maintainable, reusable, and predictable while following current contributor-platform conventions.
Sources and evidence
Sources are shown with the role they play in this guide. Historical or style-sensitive claims are kept within the evidence boundary described above.
Use links in documentation — Contributor guide↗ (opens in a new tab)Microsoft · Current Microsoft Learn contributor guidance for documentation links, including file-relative and site-relative paths, split-article YML targets, bookmarks, XRef API links, reference-style links, explicit-anchor boundaries, and secure link requirements.
Using File-Relative Links for Microsoft Learn Articles records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.
Using Site-Relative Links for Microsoft Learn Articles records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.
Using Reference-Style Links in Microsoft Learn records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.
Using Relative Paths for Microsoft Learn Conceptual Images records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.
Using Secure External Links in Microsoft Learn records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.
Choosing nameWithType and fullName in Microsoft Learn XRef Display Text records a distinct Microsoft Learn XRef authoring decision and consolidates tightly coupled syntax choices so the public guide stays useful without fragmenting one task into thin pages.
Finding and Preserving Microsoft Learn XRef UIDs records a distinct Microsoft Learn XRef authoring decision and consolidates tightly coupled syntax choices so the public guide stays useful without fragmenting one task into thin pages.
Formatting Data Matrix Tables for Microsoft Learn records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.