{"id":26319475,"url":"https://github.com/sassdawe/pnp-sharing-settings-action","last_synced_at":"2026-01-02T14:34:35.056Z","repository":{"id":233184570,"uuid":"785724893","full_name":"sassdawe/pnp-sharing-settings-action","owner":"sassdawe","description":"Packaged PnP.PowerShell action to help enforcing SharePoint Online sharing settings","archived":false,"fork":false,"pushed_at":"2024-04-18T11:35:06.000Z","size":10547,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-02T02:37:40.948Z","etag":null,"topics":["github-action","pnp-powershell"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sassdawe.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["sassdawe"],"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null}},"created_at":"2024-04-12T13:44:20.000Z","updated_at":"2024-04-18T14:28:06.000Z","dependencies_parsed_at":"2024-04-17T14:01:33.147Z","dependency_job_id":"53c72d94-cc02-4d51-aabf-2184c4b9af55","html_url":"https://github.com/sassdawe/pnp-sharing-settings-action","commit_stats":null,"previous_names":["sassdawe/pnp-sharing-settings-action"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassdawe%2Fpnp-sharing-settings-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassdawe%2Fpnp-sharing-settings-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassdawe%2Fpnp-sharing-settings-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassdawe%2Fpnp-sharing-settings-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sassdawe","download_url":"https://codeload.github.com/sassdawe/pnp-sharing-settings-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243746230,"owners_count":20341204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-action","pnp-powershell"],"created_at":"2025-03-15T15:19:10.625Z","updated_at":"2026-01-02T14:34:35.016Z","avatar_url":"https://github.com/sassdawe.png","language":null,"funding_links":["https://github.com/sponsors/sassdawe"],"categories":[],"sub_categories":[],"readme":"# PnP PowerShell Sharing Settings as Code\n\nThis action signs in into SharePoint Online using PnP PowerShell and sets the sharing capability for the specified site collections.\n\n\u003e ⚠️ **Important**: There are multiple versions of this action available. Please make sure you are using the correct version for your needs.\n\n## Variants\n\n### Version 1\n\nVersion 1 is limited to Windows based GitHub Actions runners and uses the `SharePointPnPPowerShellOnline` module to set the sharing capability for the specified site collections. It uses ACS App-Only authentication to connect to SharePoint Online. You can read more about the specifics in the [readme for version 1](https://github.com/sassdawe/pnp-sharing-settings-action/tree/version-one).\n\n### Version 2\n\nWith Version 2 this action has switched to use the `PnP.PowerShell` module and supports all runner OS types: Windows, Linux and macOS as well. It is still using ACS App-Only authentication to connect to SharePoint Online. You can read more about the specifics in the [readme for version 2](https://github.com/sassdawe/pnp-sharing-settings-action/tree/version-two).\n\n### Version 3 (in development)\n\nVersion 3 will switch to standard Entra ID app-only authentication to connect to SharePoint Online, and stop relying on ACS App-Only authentication. This will make the action more secure and reliable.\n\n## Usage\n\nThe action takes 3 mandatory parameters for sign-in and 4 optional parameters to specify the sharing capability of the site collections. The sites can be specified using their full URLs or with the `ALLELSE` keyword. When `ALLELSE` is used for any of the settings (but only for **ONE** of them), it will apply that sharing capability to all the rest of the sites which were NOT specified in the other three settings. If `null` is used for any of the settings, it will skip that setting.\n\n## Inputs\n\n### `SHAREPOINT_ADMIN_URL`\n\n**Required** URL of the SharePoint Admin Site.\n\n### `CLIENT_ID`\n\n**Required** ClientID of the service principal.\n\n### `CLIENT_SECRET`\n\n**Required** ClientSecret of the service principal.\n\n### `SHARINGCAPABILITY_DISABLED_SITES`\n\nComma separated list of URLS where to disable sharing capability, could also be \"null\" to skip this setting, or \"ALLELSE\" to disable sharing capability on all sites not specified in the other settings.\n\n### `SHARINGCAPABILITY_EXTERNALUSERSHARINGONLY_SITES`\n\nComma separated list of URLS where to enable sharing capability for external users only, could also be \"null\" to skip this setting, or \"ALLELSE\" to enable sharing capability for external users only on all sites not specified in the other settings.\n\n### `SHARINGCAPABILITY_EXTERNAUSERANDGUESTSHARING_SITES`\n\nComma separated list of URLS where to enable sharing capability for external and guest users, could also be \"null\" to skip this setting, or \"ALLELSE\" to enable sharing capability for external and guest users on all sites not specified in the other settings.\n\n### `SHARINGCAPABILITY_EXISTINGEXTERNALUSERSHARINGONLY_SITES`\n\nComma separated list of URLS where to enable sharing capability for existing external users only, could also be \"null\" to skip this setting, or \"ALLELSE\" to enable sharing capability for existing external users only on all sites not specified in the other settings.\n\n## Outputs\n\nThere is no output for this action. 🚩 But keep in mind that the generated logs will contain the specified URLs, and anyone with access the GitHub Actions logs will see which site has which sharing capability enforced. 🚩\n\n## Example usage\n\n```yaml\nuses: sassdawe/pnp-sharing-settings-action@v2\nwith:\n    SHAREPOINT_ADMIN_URL: 'https://contoso-admin.sharepoint.com'\n    CLIENT_ID: ${{ secrets.CLIENT_ID }}\n    CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}\n    SHARINGCAPABILITY_DISABLED_SITES: 'ALLELSE'\n    SHARINGCAPABILITY_EXTERNALUSERSHARINGONLY_SITES: 'https://contoso.sharepoint.com/, https://contoso.sharepoint.com/sites/Development'\n    SHARINGCAPABILITY_EXTERNAUSERANDGUESTSHARING_SITES: 'https://contoso.sharepoint.com/sites/HR, https://contoso.sharepoint.com/sites/bteam, https://contoso.sharepoint.com/sites/ateam'\n    SHARINGCAPABILITY_EXISTINGEXTERNALUSERSHARINGONLY_SITES: 'null'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsassdawe%2Fpnp-sharing-settings-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsassdawe%2Fpnp-sharing-settings-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsassdawe%2Fpnp-sharing-settings-action/lists"}