1

I have implemented SSO among two ORGS. I have made a web services class in my service Org. Can I hit that web service from my Identity provider Org using rest callout? I tried it by making a http get request which for which I use following URL pattern (service Org Url + Urlmap to Web service class) as a response I got 302 status with updated URL, Too handle this I used following code.

while (response.getStatusCode() == 302) { request.setEndpoint(response.getHeader('Location')); System.debug('END Location isi '+response.getHeader('Location')); response = new Http().send(request); } 

I was hitting this point https://cloudce-13a-dev-ed.lightning.force.com/Case/abc but it redirected to https://cloudce-13a-dev-ed.my.salesforce.com/Case

finally 404 response returns.

8
  • If I understand you correctly, it should be /services/apexrest/Case/abc. As written, I'd expect a 404 here. Commented Sep 15, 2022 at 14:50
  • @sfdcfox yet after adding this to my HTTP url I am get 401 status error Commented Sep 15, 2022 at 15:15
  • SSO does not impact API calls Commented Sep 15, 2022 at 15:16
  • @identigral could you please elaborate? Commented Sep 15, 2022 at 15:17
  • 1
    @identigral Thanks finally it works Commented Sep 19, 2022 at 11:59

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.