|
| 1 | +{ |
| 2 | + "name": "SPAnonymousLinkExpiration", |
| 3 | + "label": "Set expiration and permissions for Anyone (anonymous) sharing links", |
| 4 | + "cat": "SharePoint Standards", |
| 5 | + "tag": [ |
| 6 | + "CISA (MS.SPO.3.1v1)", |
| 7 | + "CISA (MS.SPO.3.2v1)" |
| 8 | + ], |
| 9 | + "impact": "Medium Impact", |
| 10 | + "helpText": "Requires every Anyone sharing link in SharePoint and OneDrive to expire after the configured number of days. Optionally restricts the permission Anyone links can grant on files and folders (View only, or View and edit). By default Anyone links never expire.", |
| 11 | + "executiveText": "Ensures that files and folders shared with anyone via a link stop being reachable after a set period, so a link forwarded or leaked months ago no longer grants access. Optionally limits such links to read-only, preventing anonymous recipients from changing shared content. Together these reduce the exposure created by convenience sharing without disabling it.", |
| 12 | + "docsDescription": "Sets the tenant-wide expiration for Anyone (anonymous) sharing links in SharePoint and OneDrive (SharePoint admin center > Policies > Sharing > Choose expiration and permissions options for Anyone links). Links created after the policy is applied expire at the end of the configured period. A tenant that does not require expiration reads -1 for this property (the SharePoint default), which this standard grades as drift. The optional permission variable additionally grades and sets the maximum permission Anyone links may grant on files and folders (View, or View and edit); leave it blank to grade expiration only. These settings only take effect for tenants whose sharing level permits Anyone links (see the sharingCapability standard).", |
| 13 | + "impactColour": "warning", |
| 14 | + "addedDate": "2026-09-14", |
| 15 | + "powershellEquivalent": "Set-SPOTenant -RequireAnonymousLinksExpireInDays 30 -FileAnonymousLinkType View -FolderAnonymousLinkType View", |
| 16 | + "recommendedBy": [ |
| 17 | + "CISA" |
| 18 | + ], |
| 19 | + "requiredCapabilities": [ |
| 20 | + "SHAREPOINTWAC", |
| 21 | + "SHAREPOINTSTANDARD", |
| 22 | + "SHAREPOINTENTERPRISE", |
| 23 | + "SHAREPOINTENTERPRISE_EDU", |
| 24 | + "ONEDRIVE_BASIC", |
| 25 | + "ONEDRIVE_ENTERPRISE" |
| 26 | + ], |
| 27 | + "secureScoreImpact": 0, |
| 28 | + "compare": "subset", |
| 29 | + "variables": { |
| 30 | + "days": { |
| 31 | + "type": "number", |
| 32 | + "label": "Days until Anyone links expire (1-730, default 30)", |
| 33 | + "default": 30, |
| 34 | + "validators": { |
| 35 | + "min": { |
| 36 | + "value": 1, |
| 37 | + "message": "Minimum is 1 day" |
| 38 | + }, |
| 39 | + "max": { |
| 40 | + "value": 730, |
| 41 | + "message": "SharePoint accepts at most 730 days" |
| 42 | + } |
| 43 | + } |
| 44 | + }, |
| 45 | + "linkPermission": { |
| 46 | + "type": "autoComplete", |
| 47 | + "label": "Anyone link permission for files and folders (optional - blank grades expiration only)", |
| 48 | + "options": [ |
| 49 | + { |
| 50 | + "label": "View only", |
| 51 | + "value": 1 |
| 52 | + }, |
| 53 | + { |
| 54 | + "label": "View and edit", |
| 55 | + "value": 2 |
| 56 | + } |
| 57 | + ], |
| 58 | + "omitWhenBlank": true |
| 59 | + } |
| 60 | + }, |
| 61 | + "expected": { |
| 62 | + "RequireAnonymousLinksExpireInDays": "%days%", |
| 63 | + "FileAnonymousLinkType": "%linkPermission%", |
| 64 | + "FolderAnonymousLinkType": "%linkPermission%" |
| 65 | + }, |
| 66 | + "read": { |
| 67 | + "cacheType": "SPOTenant" |
| 68 | + }, |
| 69 | + "writeTarget": "spoTenant", |
| 70 | + "writeTargetProperties": { |
| 71 | + "RequireAnonymousLinksExpireInDays": "%days%", |
| 72 | + "FileAnonymousLinkType": "%linkPermission%", |
| 73 | + "FolderAnonymousLinkType": "%linkPermission%" |
| 74 | + }, |
| 75 | + "remediate": { |
| 76 | + "executor": "SPOTenant", |
| 77 | + "properties": { |
| 78 | + "RequireAnonymousLinksExpireInDays": "%days%", |
| 79 | + "FileAnonymousLinkType": "%linkPermission%", |
| 80 | + "FolderAnonymousLinkType": "%linkPermission%" |
| 81 | + } |
| 82 | + } |
| 83 | +} |
0 commit comments