That is great thankyou Erhan!
After restoring the Administrator role you must also restore related Entity Permissions, Website Access Permissions, Webpage Access Control. But even then it kept throwing the same error. I had to restart the portal. Then it started working.
Awesome, your trick solved it.
Please refer to my blog:
Thank you so much Erhan. I didnt realize XRM had a tool for this. little quirky but works for me!
Business Applications communities