Uploaded image for project: 'Jira Service Management Cloud'
  1. Jira Service Management Cloud
  2. JSDCLOUD-8961

Users in customer role only are unable to create requests via the REST API

    XMLWordPrintable

Details

    Description

      Summary

      Users that exist only in the customer role should still be able to create requests via the REST API. Trying to reproduce this today by following the documentation in POST /rest/servicedeskapi/request I find this is not possible to do. It appears that this endpoint is only working for users in the Agent role. But the existing docs do not make it clear that being an agent is required here. (I understand it is required to be an Agent to use the RaiseOnBehalfOf parameter, but I'm not trying to use that one in this case).

      Steps to Reproduce

      1. Create a classic Jira Service Desk project
      2. Invite a customer to join that service desk (that is not currently in your Jira site)
      3. Have the customer login to the customer portal successfully at least once to make sure it works and they can see the request types there
      4. As a customer, create a REST API token for yourself as per Basic auth for REST APIs
      5. Try as a customer to create a request in that portal via the REST API using basic auth, this example uses curl
        curl --request POST \
          --url 'https://[redacted].atlassian.net/rest/servicedeskapi/request' \
          --header 'Accept: application/json' \
          --header 'Authorization: Basic [redacted]' \
          --header 'Content-Type: application/json' \
          --data '{
          "serviceDeskId": "2",
          "requestTypeId": "17",
          "requestFieldValues": {
            "summary": "Request JSD help via REST",
            "description": "Example description"
          }
        }' 
        

      Expected Results

      Request is created successfully with the customer that is making this request as the reporter.

      Actual Results

      curl command returns result of

      {"errorMessage":"You don't have permission to access this Service Desk.","i18nErrorMessage":{"i18nKey":"sd.agent.servicedesk.error.project.nopermission","parameters":[]} 
      

      Notes

      From reading the documentation on this, it is not clear that a customer would be unable to perform this action.

      Workaround

      This works if the user is an Agent, but that work-around is not viable in all use cases.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aheinzer Andy Heinzer
              Votes:
              19 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

                Created:
                Updated: