The FAQ web part can be unlocked using a validation key. If no validation key is present it will show a message in parentheses in the web part title.
If you have a working key, you can enter it in on page 3 of the web part properties.
Automatic Web Part Validation Using a Tenant property
The Badger365 FAQ web part will look for a tenant property* called Badger365-FAQ which holds your validation key. If a valid key is found, it will store it in the web properties and your web part will be unlocked. If there is no key, or if the key is invalid, you can enter a key manually.
* ) Tenant properties are also referred to as storage entities or property bags. Read more on https://learn.microsoft.com/en-us/sharepoint/dev/spfx/tenant-properties
Manual validation
- Open the web part properties
- Browse to page 3 of the web part properties
- Enter you validation code and click the unlock button.
How to configure a tenant property
Tenant properties can only be configured through command line. The easiest way to set up the tenant property is through PowerShell. Run the code snippet below in PowerShell to set the tenant property Badger365-FAQ to your Key.
Make sure you have PNP PowerShell installed and that you have the right credentials to create a tenant property and run the script. You will be prompted login, provide a link to your app catalog site and your validation key for the web part.
write-host ""
write-host ""
write-host "This script will create the tenant property 'Badger365-FAQ' at the indicated site." -ForegroundColor Yellow
write-host ""
write-host "Please enter the site URL e.g. https://<tenantname>.sharepoint.com/sites/AppCatalog"
$site = Read-Host -Prompt "Site URL"
write-host "Please enter the Validation key ID e.g. A1B2C3D4"
$validationKey = Read-Host -Prompt "Validation Key"
$comment = Read-Host -Prompt "Comment (optional)"
Connect-PnPOnline –Url $site -Interactive
Set-PnPStorageEntity -Key "Badger365-FAQ" -Value $validationKey -Comment $comment
write-host ""
write-host "Done!" -ForegroundColor Green
Get-PnPStorageEntity -key "Badger365-FAQ"
Check if a key is present
To see if the Badger365-FAQ key exists and what its value is, use
Get-PnPStorageEntity -Key "Badger365-FAQ"
Remove the key
If you need to remove the tenant property, connect to the site and use
Remove-PnPStorageEntity -Key "Badger365-FAQ"