I've previously accessed Salesforce reports programatically using a .NET webRequest to the following end point:


Including the user access token in the cookie.

I've since switched the organisation to use Lightning UI and ever since, the webrequest no longer returns the CSV instead it returns what looks like a new Salesforce intercepting page introduced with lightning (fireworks with the Salesforce logo).

Is there anyway around this intercepting page? Or any other way to access a report progrmatically?

2 Answers 2


Welcome to the dark side of URL hacking.

Not saying that URL hacking is bad...it has been a long practiced, yet unsupported part of implementing Salesforce for a long time. It is just fragile, and clearly not the way forward in Lightning Experience.

I think what you might want to look into is the reporting API. This will allow you to request a report, get the response in a JSON format, then use a local visualization engine to render the results.

Another option you might want to look into is lightning-out, which can take something written in Lightning Components and render it in an external web container.

As an interim hold-over while you sort that out, you could look into the user that is making the .NET request to be a user with LEX turned off, so that the request will still work using the salesforce classic URL scheme.

  • Thanks Peter, I've looked into the reporting API but in my use case, I'll certainly hit the 2000 row limit. Unfortunatley I can't see any details about paging in the reporting API in order to get more records than 2000.
    – Ronnie
    Aug 2, 2016 at 8:44

We had the same problem after switching to Lightning. Try appending the isdtp=p1parameter to your URL:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .