Authorized Search is now available as part of Yext’s Consumer Auth. Authorized Search refers to a search experience where each user can see different results for the same query based on which entities or documents they have access to.
If you are looking to implement Authorized Search, you have a couple options to manage user access rules:
- Yext Authorization — this pulls from user access controls in Yext. For each user, you can designate in Yext which entities they have permissions to view and limit their Answers Experiences results to match their entity level authorization. This is a great option if you manage all of your users in Yext.
- External Authorization — this integrates permissions from an external source (such as Google Drive or Sharepoint) with the entities in the Yext Platform. An external identity can be passed at query time in your token and linked to entities in the Knowledge Graph. This is a great option for data sets that already have document-level access control lists and permissions are managed outside of Yext.
Authorized search is configured at the vertical level, so you can leverage both Yext authorization and External authorization in the same experience for different verticals. You can also have verticals without any authorization if you’d like to keep everything in a certain vertical visible to everyone.
Yext Auth:
Step 1: Set up the Yext IDP and Create a Token
You’ll need to configure your site to login with Yext, and then mint a token that contains the searcher’s identity. This will be passed as an Authorization header to your Answers GET request.
Step 2: Configure User Permissions
You first need to make sure that users have access to the relevant entities. To do this, you will need to add the ‘View in Answers’ role to the relevant users and add the entities you’d like them to see in Answers as the Scope of the role.
Step 3: Add authorization snippet to Answers
You will need to add the authorization snippet to your Answers configuration. This step may differ depending on how you built your Answers Experience.
{
"verticals": {
"internalDocuments": {
"entityTypes": ["c_internalDocuments"],
"authorization": {
"type": "yext"
}
},
External Auth:
Step 1: Create token (outside of Yext)
You’ll need to mint a token that contains the searcher’s identity, and pass it as an Authorization header to your Answers GET request.
Step 2: Configure entities
External authorization is configured on the entities in the Knowledge Graph. You need to make sure all of your entities that you want to include in your permissioned search experience have the correct permissions associated with them. In general, we recommend using a Connector to pass this data in automatically from the external source.
Step 3: Add authorization snippet to Answers
You will need to add the authorization snippet to your Answers configuration. This step may differ depending on how you built your Answers Experience.
{
"verticals": {
"googleDrive": {
"entityTypes": ["googleDriveDocument"],
"authorization": {
"type": "external"
}
},
For more details on Authorized Search and Consumer Auth with Yext visit this module, and this guide.