401 unauthorized error while attempting to publish an item using the Publishing Service

  • Publishing might fail with a 401 unauthorized exception and redirect a user to the login page because the Sitecore Publishing Service (SPS) module is not authorized for users with a custom role. The issue occurs if roles are added as members of other roles. In cases where roles are explicitly added to the user, the publishing succeeds.
  • To resolve the issue, add the required role directly as follows:
    1. Add your custom Sitecore role (for example, CustomPublishingRole) as a member to the Publishing Service Administrator role.
    2. Add the CustomPublishingRole role to the allowedPublishRoles and allowedFullPublishRoles nodes of the Sitecore.Publishing.Service.config file.
    3. Assign the CustomPublishingRole role to a Sitecore user.

Applies to:

Publishing Service Module 9.1.0 - 9.2.0

May 01, 2020
June 23, 2020

Reference number:

360559

Keywords: 

  • Publishing