Can I use SSO credentials to hit my Subscribed org Web Service Class in Salesforce?

Viewed 16

I have implemented SSO among two ORGS. I have made a web services class in my Subscribed 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 (Subscribed 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

But nothing happens.

0 Answers
Related