diff --git a/readme.md b/readme.md index b9cac90..aa9b89b 100644 --- a/readme.md +++ b/readme.md @@ -1,12 +1,26 @@ # PnP PowerShell Sharing Settings as Code -> credit goes to [aakashbhardwaj619](https://github.com/aakashbhardwaj619) as I built this action based on his work. +This action signs in into SharePoint Online using PnP PowerShell and sets the sharing capability for the specified site collections. -This action signs in into SharePoint Online using ACS and sets the sharing settings for the site collections. +> ⚠️ **Important**: There are multiple versions of this action available. Please make sure you are using the correct version for your needs. -If `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 settings. If `null` is used for any of the settings, it will skip that setting. +## Variants -> !Important: The v1 version requires the use of **Windows** based runners to run this action currently. +### Version 1 + +Version 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). + +### Version 2 + +With 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). + +### Version 3 (in development) + +Version 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. + +## Usage + +The 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. ## Inputs @@ -40,12 +54,12 @@ Comma separated list of URLS where to enable sharing capability for existing ext ## Outputs -There is no output for this action. +There 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. 🚩 ## Example usage ```yaml -uses: actions/pnp-sharing-settings-action@v1 +uses: sassdawe/pnp-sharing-settings-action@v2 with: SHAREPOINT_ADMIN_URL: 'https://contoso-admin.sharepoint.com' CLIENT_ID: ${{ secrets.CLIENT_ID }}