I researched to process the reports using authentication on a vf page so that I can restrict the usage.

I found the following article to do the same using php in Five9:


Also, I got an article which discusses the same for a callout:


Here is the code which was proposed :

HTTP h = new HTTP();
HTTPRequest r = new HTTPRequest();
Blob headerValue = Blob.valueOf(username + ':' + password);
String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
r.setHeader('Authorization', authorizationHeader);
HTTPResponse resp = h.send(r);

Please assist if this can be done in salesforce to access reports and dashboards.



No. Salesforce uses a number of authentication methods, including SAML, SOAP, and OAuth2. However, Basic Authentication is not supported by Salesforce. You'll have to use another means of authentication. You'll want to read the various developer guides to determine which method is best for your use case, but you'll probably want OAuth2, which is relatively simple to use and avoids you needing to handle/maintain usernames and passwords.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.