[Model-driven app – Custom Pages] How to fix the UserNotLoggedIn error when loading a custom page on the iOS native player?

As you know, Model-driven apps can be used on different clients, like Android smartphones and tablets or iOS iPads and iPhones.

Recently, I had the opportunity to test Custom pages with the Native player from Microsoft on Android and iOS. This worked perfectly on Android, but not on iOS. Indeed, an error message is displayed while loading the Custom Page.

In the following demo, I have a Custom Page called “NavigationApi4CP Examples”. When trying to open it, the error message “[NotLoggedInError] User is not logged in. Error: (…)” is displayed:

After reading some Microsoft docs, I understood that this is related to third-party cookies. In fact, Custom pages require third-party cookies to be enabled, which is required by the canvas app runtime. To learn more about the current limitations related to the Custom pages, I recommend you to read the following documentation.

In order to enable third-party cookies and thus fix the problem. It is necessary to allow Cross-Website Tracking on the native player on your iOS device. To do so, follow these steps:

  1. Select Settings.
  2. Scroll down to Power Apps.
  3. Toggle on Allow Cross-Website Tracking.

To learn more about how to enable third-party cookies on other clients like Dynamics 365 for phones or Dynamics 365 for tablets app on iOS or even safari. Please refer to the following documentation.

After allowing Cross-Website Tracking. The custom page loads without any problem, knowing that my custom page contains a lot of PCF controls !

Hope it helps …

One thought on “[Model-driven app – Custom Pages] How to fix the UserNotLoggedIn error when loading a custom page on the iOS native player?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s