Skip to content

Commit af99064

Browse files
Merge pull request #28287 from microsoftgraph/main
Auto Publish – main to live - 2026-02-21 00:30 UTC
2 parents bdc210a + d384b1e commit af99064

12 files changed

Lines changed: 224 additions & 80 deletions

.github/prompts/author-api-docs.prompt.md

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,51 @@ After updating What's new, update the appropriate TOC mapping file to make new d
260260
- Complex types should NEVER be in the `resources` array
261261
- API methods are NOT typically added to TOC - they auto-generate from the resource's Methods table
262262

263+
### Common Process: Handling Code Snippets in Examples
264+
265+
**DO NOT manually add SDK snippets or related artifacts to the Example request section**, including:
266+
- `# [HTTP](#tab/http)` tab declarations
267+
- Tab boundary markers (`---`)
268+
- Language-specific SDK snippet includes (e.g., `[!INCLUDE [sample-code](../includes/snippets/csharp/...)]`)
269+
- SDK snippet files in the includes folder
270+
271+
**Why:** SDK snippets are automatically generated and managed separately via automation.
272+
273+
**For new files:** Include only HTTP request examples using `msgraph-interactive` (for URLs without an ID placeholder, e.g., `https://graph.microsoft.com/v1.0/users`) or `http` language identifier. No tabs or SDK includes.
274+
275+
**For existing files:** Follow the established pattern. If the file has no SDK snippets, add only HTTP examples. Do not introduce SDK snippets to files lacking them.
276+
277+
**Example HTTP-only format:**
278+
279+
```markdown
280+
### Request
281+
282+
<!-- {
283+
"blockType": "request",
284+
"name": "create_user"
285+
}-->
286+
287+
\```msgraph-interactive
288+
POST https://graph.microsoft.com/v1.0/users
289+
Content-type: application/json
290+
291+
{
292+
"accountEnabled": true,
293+
"displayName": "Adele Vance",
294+
"mailNickname": "AdeleV",
295+
"userPrincipalName": "AdeleV@contoso.com",
296+
"passwordProfile": {
297+
"forceChangePasswordNextSignIn": true,
298+
"password": "xWwvJ]6NMw+bWH-d"
299+
}
300+
}
301+
\```
302+
```
303+
304+
**When promoting from beta to v1.0:** Remove SDK snippets and tab markers for files copied from beta; keep only HTTP examples (see [Scenario 2](#scenario-2-promote-apis-from-beta-to-v10)).
305+
306+
---
307+
263308
### Reference Standards: Namespace Qualification
264309

265310
Microsoft Graph APIs use namespaces to organize types and operations. Understanding namespace qualification is critical for correct documentation.
@@ -406,6 +451,27 @@ The tooling that generates doc stubs typically assumes **all EntityType resource
406451

407452
**Remember:** The presence of a doc stub does NOT mean the operation is supported. Always verify against the API.md file and Documentation Plan.
408453

454+
#### Handling missing doc stubs
455+
456+
**Important:** If doc stubs are missing for APIs/resources/permissions mentioned in the Documentation Plan or API.md file, DO NOT attempt to regenerate them manually.
457+
458+
**What to do:**
459+
1. Identify which specific files are missing based on the Documentation Plan and API.md
460+
2. Inform the author about the missing files
461+
3. Ask the author to provide the missing doc stubs from Graph Studio or the autogeneration process
462+
4. Wait for the author to add the missing files to `temp-docstubs` before proceeding
463+
464+
**Example notification to author:**
465+
"The Documentation Plan references [resource/API name], but I don't see the corresponding doc stub file in temp-docstubs. Please add the following missing files:
466+
- [list specific missing file names]"
467+
468+
**Do NOT:**
469+
- Attempt to create doc stub files from scratch
470+
- Proceed with documentation without the required doc stubs
471+
- Assume missing files mean the feature should not be documented
472+
473+
**Remember:** Doc stubs contain critical autogenerated metadata (permissions, namespace, type references, JSON representations) that should not be manually created.
474+
409475
### Supporting updates to consider
410476

411477
For all API changes, include the following updates as applicable:
@@ -490,6 +556,7 @@ For each copied file, make the following updates:
490556
- This include should be deleted for v1.0 GA documentation
491557

492558
2. **Remove SDK snippet links** from the Example Request section:
559+
- See [Common Process: Handling Code Snippets in Examples](#common-process-handling-code-snippets-in-examples) for complete guidance
493560
- Remove the `# [HTTP](#tab/http)` tab
494561
- Remove the tab boundary marker (`---`)
495562
- Remove all language-specific SDK snippet include links (e.g., `[!INCLUDE [sample-code](../includes/snippets/csharp/...)]`)
@@ -1266,7 +1333,8 @@ Before working on any file, apply these rules to both resource and API files:
12661333
- Example: An API that returns multiple object types might return an `@odata.type` property for each object to help differentiate each object type in the collection
12671334

12681335
9. **Examples section:**
1269-
- Leave this section unchanged
1336+
- Follow HTTP-only example formatting (see [Common Process: Handling Code Snippets in Examples](#common-process-handling-code-snippets-in-examples))
1337+
- Do NOT manually add SDK snippet links, tab markers, or language-specific includes
12701338
- When adding a new property to a resource, update example request and response bodies for that resource where applicable
12711339

12721340
### To add new properties to existing resources
@@ -1716,6 +1784,8 @@ Before completing any authoring task, verify:
17161784
- [ ] Examples section: Copy examples from API.md and format as applicable
17171785
- [ ] Examples section: Request URL matches URL in "HTTP request" block except full URL
17181786
- [ ] Examples section: New properties reflected in request/response bodies where applicable
1787+
- [ ] Examples section: SDK snippets NOT manually added (see [Common Process: Handling Code Snippets in Examples](#common-process-handling-code-snippets-in-examples))
1788+
- [ ] Examples section: Only HTTP examples included for new files
17191789

17201790
**For all files (new and updated):**
17211791
- [ ] All required sections are present and in correct order

.github/workflows/changelog-validation.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
- name: Validate JSON
14-
uses: docker://orrosenblatt/validate-json-action:latest
15-
env:
16-
INPUT_SCHEMA: /changelog/Changelog.Schema.json
17-
INPUT_JSONS: /changelog/Manual.NonWorkloadChanges.json,/changelog/Microsoft.AAD.Reporting.json,/changelog/Microsoft.Analytics.json,/changelog/Microsoft.BitLocker.json,/changelog/Microsoft.CloudManagedDesktop.json,/changelog/Microsoft.Compliance.Ediscovery.json,/changelog/Microsoft.DirectoryServices.json,/changelog/Microsoft.EducationAssignment.json,/changelog/Microsoft.Excel.json,/changelog/Microsoft.Exchange.json,/changelog/Microsoft.FileServices.json,/changelog/Microsoft.HybridAuthentication.json,/changelog/Microsoft.IdentityGovernance.AccessReviews.json,/changelog/Microsoft.IdentityProtectionServices.json,/changelog/Microsoft.Intune.json,/changelog/Microsoft.MicrosoftSearch.json,/changelog/Microsoft.NAV.json,/changelog/Microsoft.O365Reporting.json,/changelog/Microsoft.Office.Tasks.json,/changelog/Microsoft.OneNote.json,/changelog/Microsoft.PrintService.json,/changelog/Microsoft.Search.json,/changelog/Microsoft.SharePoint.json,/changelog/Microsoft.Skype.Calling.json,/changelog/Microsoft.SubscriptionServices.json,/changelog/Microsoft.Teams.Core.json,/changelog/Microsoft.Teams.GraphSvc.json,/changelog/Microsoft.ThreatAssessment.json,/changelog/Microsoft.Todo.json,/changelog/Microsoft.People.json
18-
- name: Validate Schema with Script
13+
- name: Validate Changelog JSONs with Schema
1914
run: |
20-
./validate-changelog-json.ps1
15+
./scripts/validate-changelog-json.ps1
2116
shell: pwsh
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Validate temp-docstubs folder
2+
3+
on: [pull_request, push]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
verify-temp-docstubs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Validate temp-docstubs folder
14+
run: |
15+
./scripts/validate-temp-docstubs.ps1
16+
shell: pwsh

api-reference/beta/resources/enums-security.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,7 @@ Namespace: microsoft.graph.security
10221022
|sPRuntimeAccessControl|
10231023
|sPSharingNotifyUser|
10241024
|sPSharingGenerateIncidentReport|
1025+
|restrictWebGrounding|
10251026

10261027
### executionMode values
10271028

api-reference/beta/resources/restrictaccessactionbase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Use [restrictaccessaction](../resources/restrictaccessaction.md) to explicitly r
2222

2323
|Property|Type|Description|
2424
|:---|:---|:---|
25-
|action|microsoft.graph.security.dlpAction|The type of DLP action. Inherited from [dlpActionInfo](../resources/dlpactioninfo.md).The possible values are: `notifyUser`, `blockAccess`, `restrictWebGrounding`, `deviceRestriction`, `browserRestriction`, `unknownFutureValue`, `restrictAccess`, `generateAlert`, `generateIncidentReportAction`, `sPBlockAnonymousAccess`, `sPRuntimeAccessControl`, `sPSharingNotifyUser`, `sPSharingGenerateIncidentReport`. Use the `Prefer: include-unknown-enum-members` request header to get the following values from this [evolvable enum](/graph/best-practices-concept#handling-future-members-in-evolvable-enumerations): `restrictAccess` , `generateAlert` , `generateIncidentReportAction` , `sPBlockAnonymousAccess` , `sPRuntimeAccessControl` , `sPSharingNotifyUser` , `sPSharingGenerateIncidentReport`.|
25+
|action|microsoft.graph.security.dlpAction|The type of DLP action. Inherited from [dlpActionInfo](../resources/dlpactioninfo.md). The possible values are: `notifyUser`, `blockAccess`, `deviceRestriction`, `browserRestriction`, `unknownFutureValue`, `restrictAccess`, `generateAlert`, `generateIncidentReportAction`, `sPBlockAnonymousAccess`, `sPRuntimeAccessControl`, `sPSharingNotifyUser`, `sPSharingGenerateIncidentReport`, `restrictWebGrounding`. Use the `Prefer: include-unknown-enum-members` request header to get the following values from this [evolvable enum](/graph/best-practices-concept#handling-future-members-in-evolvable-enumerations): `restrictAccess`, `generateAlert`, `generateIncidentReportAction`, `sPBlockAnonymousAccess`, `sPRuntimeAccessControl`, `sPSharingNotifyUser`, `sPSharingGenerateIncidentReport`, `restrictWebGrounding`.|
2626
|restrictionAction|microsoft.graph.security.restrictionAction|Action for the app to take. The possible values are: `warn`, `audit`, `block`.|
2727

2828
## Relationships

0 commit comments

Comments
 (0)