1

We have implemented 2FA for partner community user. Since then we are facing an issue while trying to render pdf in a VF page.Here is the flow

After successful login through 2FA, "Partner community user" clicks on a Next button, a queueable class generates a pdf and sends it to 3rd part DMS. When we tried to view the pdf in SF from DMS UI, it threw an error saying "pdf could not be loaded".Initially we thought that the pdf was corrupted but after opening it in a notepad, we found below.Basically its redirecting to some Identity query string.If I simply launch https//mydomain.force.com/_ui/identity/verification.... , the pdf renders.

How can we get this bypassed in VF when 2FA is ON

function redirectOnLoad() {
if (this.SfdcApp && this.SfdcApp.projectOneNavigator) { SfdcApp.projectOneNavigator.handleRedirect('/_ui/identity/verification/policy/VerificationStartUi/e?sea=0&vcsrf=Qr7TJnRRPIspy9XwaUKe8Qj_f4CjlMeJJJBzOTObXFlSh2MGwpfogyOqCl1-bZQIhdHzlt74JRc-mc5TWSf25BzLch6maFEpqJxT2mJaJP9W24PCZrhOAUrrUDXRsCKkkj3f1V1gFYl-hXBdfmu_5Mh0vwc8P3NYoebKUm33iSVschvb0QK-BNdNsglIxnOOFW1aCVUVj0Xc2uD_TgBLtM3TPcSmwMGq3Sbzm1WYF2CzC7H_2S03IeSXj2sdEVU1Utnd1JLCd34xYxCj2wKBrvGEo1R6SvRnUGUE9wnK2rKbVRQ40Rq9VDgoa2ip_ZDrprQZ91vuWI9KXCwEH6aKtTZr4OegjM5in2_fvkTULM1DFh21CuBMvUJKF3EQOruR2Hrc-7uXJNg3SdJEFoyYyx8equiYp0zSDLuwYDSVdlLcz-ogfBz0g_AbwoJgq31mErpZH8Yb22-XQa_HXzzUdQtwRxXPrfo-uNDaNEb7Yns0p1kpurfsxDwk7n5-YgxbgRmTlE3yt3rdVGQNcR26GJbR9yypv5OHVVk4ys9V3kyDxYgSZTI9BjJbzaOzzomGPjirSqGhgIzxTga8TrkGhEQJd4t1e2P9bfzu4D1jD-wzUQw6lNHTrgWMrZpkAnfHezegtEzRLNPMbYnEt1R1oSgwWZWLX-QXAVBlwq_jlE%3D&vpol=pe&vflid=0&retURL=%2Fapex%2FMF_DP_PDFGenerator%3FassetId%3Da330I00000L8EzhQAF%26inline%3D1'); }  else 
if (window.location.replace){ 
window.location.replace('/_ui/identity/verification/policy/VerificationStartUi/e?sea=0&vcsrf=Qr7TJnRRPIspy9XwaUKe8Qj_f4CjlMeJJJBzOTObXFlSh2MGwpfogyOqCl1-bZQIhdHzlt74JRc-mc5TWSf25BzLch6maFEpqJxT2mJaJP9W24PCZrhOAUrrUDXRsCKkkj3f1V1gFYl-hXBdfmu_5Mh0vwc8P3NYoebKUm33iSVschvb0QK-BNdNsglIxnOOFW1aCVUVj0Xc2uD_TgBLtM3TPcSmwMGq3Sbzm1WYF2CzC7H_2S03IeSXj2sdEVU1Utnd1JLCd34xYxCj2wKBrvGEo1R6SvRnUGUE9wnK2rKbVRQ40Rq9VDgoa2ip_ZDrprQZ91vuWI9KXCwEH6aKtTZr4OegjM5in2_fvkTULM1DFh21CuBMvUJKF3EQOruR2Hrc-7uXJNg3SdJEFoyYyx8equiYp0zSDLuwYDSVdlLcz-ogfBz0g_AbwoJgq31mErpZH8Yb22-XQa_HXzzUdQtwRxXPrfo-uNDaNEb7Yns0p1kpurfsxDwk7n5-YgxbgRmTlE3yt3rdVGQNcR26GJbR9yypv5OHVVk4ys9V3kyDxYgSZTI9BjJbzaOzzomGPjirSqGhgIzxTga8TrkGhEQJd4t1e2P9bfzu4D1jD-wzUQw6lNHTrgWMrZpkAnfHezegtEzRLNPMbYnEt1R1oSgwWZWLX-QXAVBlwq_jlE%3D&vpol=pe&vflid=0&retURL=%2Fapex%2FMF_DP_PDFGenerator%3FassetId%3Da330I00000L8EzhQAF%26inline%3D1');
} else {
window.location.href ='/_ui/identity/verification/policy/VerificationStartUi/e?sea=0&vcsrf=Qr7TJnRRPIspy9XwaUKe8Qj_f4CjlMeJJJBzOTObXFlSh2MGwpfogyOqCl1-bZQIhdHzlt74JRc-mc5TWSf25BzLch6maFEpqJxT2mJaJP9W24PCZrhOAUrrUDXRsCKkkj3f1V1gFYl-hXBdfmu_5Mh0vwc8P3NYoebKUm33iSVschvb0QK-BNdNsglIxnOOFW1aCVUVj0Xc2uD_TgBLtM3TPcSmwMGq3Sbzm1WYF2CzC7H_2S03IeSXj2sdEVU1Utnd1JLCd34xYxCj2wKBrvGEo1R6SvRnUGUE9wnK2rKbVRQ40Rq9VDgoa2ip_ZDrprQZ91vuWI9KXCwEH6aKtTZr4OegjM5in2_fvkTULM1DFh21CuBMvUJKF3EQOruR2Hrc-7uXJNg3SdJEFoyYyx8equiYp0zSDLuwYDSVdlLcz-ogfBz0g_AbwoJgq31mErpZH8Yb22-XQa_HXzzUdQtwRxXPrfo-uNDaNEb7Yns0p1kpurfsxDwk7n5-YgxbgRmTlE3yt3rdVGQNcR26GJbR9yypv5OHVVk4ys9V3kyDxYgSZTI9BjJbzaOzzomGPjirSqGhgIzxTga8TrkGhEQJd4t1e2P9bfzu4D1jD-wzUQw6lNHTrgWMrZpkAnfHezegtEzRLNPMbYnEt1R1oSgwWZWLX-QXAVBlwq_jlE%3D&vpol=pe&vflid=0&retURL=%2Fapex%2FMF_DP_PDFGenerator%3FassetId%3Da330I00000L8EzhQAF%26inline%3D1';
} 
} 
redirectOnLoad();
</script>```
 

1 Answer 1

2

We identified the issue. The 'Session Security Level Required at Login = High Assurance' added at Profile level for Partner users to enforce MFA (High assurance session) was causing the issue i.e. asking for re verification in Async context (Future/Queueable) .

We updated it to "None" and instead checked 'Multi-Factor Authentication for User Interface Logins' in profile. It worked

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.