web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Issue when refreshing ...
Power Pages
Suggested Answer

Issue when refreshing site

(0) ShareShare
ReportReport
Posted on by 6
Hi all,
We have an odd issue with Power Pages site. It is using Entra ID via OpenID Connect and users are manually provisioned into the contacts and external identity tables.
Randomly, when users refresh the page, they're presented with a 'Something went wrong' page. The error message is 'Value cannot be null. Parameter name: value' and the full error seems related to cookies.
We have found clearing the cookie ‘.AspNet.ApplicationCookie’ (or all if there are multiple) will restart the session and clear the error.
 
Is there anything I can check to diagnose this? 

Many thanks
I have the same question (0)
  • Suggested answer
    Inogic Profile Picture
    1,283 Moderator on at
    Hi,
     
    This usually happens because of a cookie or session issue with the Entra ID login.

    The error “Value cannot be null” typically means the authentication cookie has become invalid or expired, which is why clearing the .AspNet.ApplicationCookie fixes the problem.

    You can try checking a few things: make sure your OpenID Connect settings are correct, see if multiple cookies are getting created (sometimes due to domain or subdomain differences), and review cookie settings like SameSite and Secure. It’s also worth checking if there’s any mismatch between session timeout and token expiry.

    If this started suddenly, it could also be due to a recent platform update. You can use browser developer tools to inspect cookies when the issue occurs.

    Hope this helps!
     
    Thanks!
    Inogic
  • CT-19030932-0 Profile Picture
    6 on at
    Hi @Inogic,
     
    Thanks for your reply. When you mention about the session timeout and token expiries, I assume you mean between Entra ID and Power Pages?
    We have a custom timeout set in Conditional Accces, so I assume this would need to match in Power Pages?
     
    I am using the built in Entra ID auth option in Power Pages, so there is limited settings as to what I can change there.
     
    Many thanks,

    Conor
  • CT-19030932-0 Profile Picture
    6 on at
    Also, I do see multiple .AspNet.ApplicationCookie being created. We have to clear these all (usually 3) to solve the issue.
    Where would be best to check for this? 
     
    Many thanks
  • Suggested answer
    Inogic Profile Picture
    1,283 Moderator on at
    Hi,

    Yes, you’re right — the session timeout and token expiry I mentioned are mainly between Entra ID and Power Pages, and mismatches there can definitely cause this kind of issue.

    If you’ve configured a custom timeout in Conditional Access, Power Pages doesn’t give much direct control to match it exactly. So if the Entra ID token expires earlier (or behaves differently) than the Power Pages session cookie, it can leave the session in an inconsistent state — which is when you see errors like “Value cannot be null.”

    Regarding the multiple .AspNet.ApplicationCookie cookies — that’s actually a key clue here. This usually happens due to:
      • Different domains/subdomains (e.g., www vs non-www, or multiple environments)
      • Cookie path or domain mismatch
      • Redirects during login creating duplicate cookies
    What you can check:
      • Make sure your site is always accessed via a single consistent URL (same domain and protocol — HTTPS)
      • Check if there are any redirects (like HTTP → HTTPS or domain changes) during login
      • In browser dev tools → Application → Cookies, verify if cookies are being set with different domains or paths
      • Also review Power Pages site settings like Authentication/OpenIdConnect settings (even though limited, sometimes reply URLs or authority mismatches can cause this)
    Since you're using built-in Entra ID auth, most control is on the Entra side — so it’s worth reviewing:
      • Token lifetime policies / Conditional Access session controls
      • Sign-in frequency settings
    If multiple cookies are being created consistently, it’s very likely a domain or redirect-related issue rather than just timeout.

    If possible, try reproducing the issue and capture a network trace (HAR file) — that can help pinpoint exactly when the extra cookies are being set.

    Hope this helps.
     
    Thanks!
    Inogic
     
  • Suggested answer
    oliver.rodrigues Profile Picture
    9,471 Most Valuable Professional on at
    Can you confirm what is the setting you have in Power Pages as well as the Entra conditional policy?
     
    You can also disable the "Custom Error Page" from the Power Platform Admin Center to view the real exception behind the scenes, just to make sure it is session related
     
    let me know if you need the steps to check any of the above
  • CT-19030932-0 Profile Picture
    6 on at
     
    The setting in Power Pages was the default, so 24 hours. I've lowered this to 30 mins and it has 'solved' the issue. It seems the user times out before the mismatch occurs now.
     
    Attached is the full screenshot of the error.
     
    Thanks.
    Claims Error.png
  • Suggested answer
    oliver.rodrigues Profile Picture
    9,471 Most Valuable Professional on at
    One suggestion to try would be changing the default web template, you can add a condition to ensure the user is authenticated, and then redirect to the home page if needed.
     
    {% if user %}
         // default code responsible for rendering the page
    {% else %}
         // redirect user to home page
    {% endif %}
     
     
     
    - note, you should create a copy instead of changing the default one and then updating it in all of your pages
    - for testing purposes you can change the default temporarily

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 64

#2
Valantis Profile Picture

Valantis 46

#3
rezarizvii Profile Picture

rezarizvii 43

Last 30 days Overall leaderboard