function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Harshala P ShewaleHarshala P Shewale 

Admin User Impersonate Community User SAML SSO

Hello All,

I have implemented a community and giving SAML SSO access to multiple external apps to community users. Created connected apps to setup SSO and showing those connected apps on the community using the lightning component.

I am working on one requirement where the Customer wants an ability for the system admin to troubleshoot community user access to external apps using SSO. Admin is trying to log in as 'Login As Community User' and clicking on App However, we are getting below error -

Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. For more information, see Insufficient Privileges Errors.


Please help us out on the same.
AbhishekAbhishek (Salesforce Developers) 
When we've encountered this issue it's usually a sharing rule or role hierarchy issue, but it can be hard to pin down. What we usually do to troubleshoot is

Check that the test user has access to edit the record outside the Visualforce page.

Check that the refresh doesn't return different information that they may not have access to
Check that the database transaction does not trigger updates or changes to other records
If it does, check that the test user has the permissions to change those
For instance, we had a VF page that updated the campaign member records, sometimes the related account, and sometimes created a related opportunity. We discovered that we would run into the issue if


Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.
Harshala P ShewaleHarshala P Shewale
Hi Abhishek,

System admin is trying to log in as a community user. So definitely there is no access issue here. 

I read this article, which has some decent explanation however its not a salesforce article to I can not reply to it 100% - https://salesforce.stackexchange.com/questions/16619/insufficient-privileges-while-impersonating-an-user-in-salesforce


 
AbhishekAbhishek (Salesforce Developers) 
Harshala,

I have gone through this https://salesforce.stackexchange.com/questions/16619/insufficient-privileges-while-impersonating-an-user-in-salesforce

Based on that I have checked our internal articles the information provided above is accurate.

I have an article which states same the same but Internal So I can't share it with you.


Regards,
​​​​​​​Salesforce Support.
Harshala P ShewaleHarshala P Shewale
Abhishek,

If this is something not doable and Salesforce must share an article stating the same. I am in a tough situation to let the client know this.Is there any article which states and accessible to everyone?
AbhishekAbhishek (Salesforce Developers) 
As of now don't have an article to share with you.