Breaking Power Apps portal is easy. But it takes time to fix what’s broken and sometimes it takes longer than you expected. I broke my portal couple of months ago and I thought I manged to repair it somehow. But some bits and pieces remained broken. Sometimes things stay broken but you don’t see it till you touch a very specific area or functionality. This is what happened to me. I will tell you what was broken at the end. But first…
It started when we implemented Web Page Access Control rules. You need those to define an access to certain pages. You control it by specifying what user can do with the page by creating a Web Page Access Control rule and who is this user by linking the particular Web Role.
When I was trying to access any custom portal page as a non-authenticated user I was getting this error below:

The expected behaviour in this particular case would be a redirect to the page where user would be asked to log in to the portal. It worked this way on our Production environment but for DEV and UAT something went wrong.
OK. My portal is broken so what do I do next?!
First thing you can try when your portal doesn’t behave the way you want it to behave is to run checks. To find your useful Portal Checker from https://make.powerapps.com/ for your environment from the Apps right-click on your portal app then select Settings.

In the Portal Settings window select Advanced options then Administration.

It will open PowerApps Portals admin center for you in a new window. From the left navigation menu pick up Run Portal Checker then click on the Run Portal Checker button on the screen.

After it run all the checks it displays you the report. You could easily see some issues if any. Well done for Pass but look closely for Warnings and Errors. This is a very helpful article describing each item in the report and how to fix if there is a problem in details: https://docs.microsoft.com/en-au/powerapps/maker/portals/faq
I was very surprised to discover that my error is actually not an error at all. It just we renamed our portal Home page and currently tool doesn’t like it. Which is a bug, but not exactly our bug. It’s a bug in the tool. BUT…

You can’t see it on this screenshot because the issue is fixed but in our case we were missing Page Not Found page on the portal. Creating the page didn’t fix the issue, unfortunately. Fortunately, it gave us another clue. Well, I won’t guess it myself, I was directed by one very intelligent Microsoft professional. Our issue was related to Access Denied page.

I didn’t know this but Access Denied page is responsible for the redirect to Sign In on my Home page. It didn’t have a Parent page property populated for the localized page which was the actual cause of our issue.

Populating this property for the page fixed our issue.

I promised you to tell what was broken from the beginning. Many months before we discovered the issue I accidentally removed Home page. Completely removed Home page from the portal. It sounds crazy but it’s true. When I restored the page I had to manually re-link it to all child pages and files. I just missed the Access Denied page because I didn’t know about it significance to the portal.
1 thought on “Power Apps Portal. “Value cannot be null” error.”