hardMultiple ChoiceObjective-mapped
PL-900 Practice Question: A Power Pages site uses a custom Liquid template…
A Power Pages site uses a custom Liquid template to display a chart using Chart.js. The chart data is fetched from a Dataverse table using a web API call from JavaScript. The page loads but the chart fails to render. You suspect a cross-origin issue. What is the most likely cause and solution?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Upload the Chart.js library as a web file in the portal and reference it locally.
Power Pages sites enforce a Content Security Policy (CSP) that restricts the sources from which scripts and data can be loaded. The external Chart.js library loaded from a CDN is likely blocked by the CSP. The correct solution is to upload the Chart.js library as a web file in the portal and reference it locally (option A). Option B (Disabling CSP) is not recommended and weakens security. Option C (using credentials: 'include') is unrelated to cross-origin script loading; it pertains to cookie handling in fetch requests. Option D (using a different library) does not address the root cause—any external resource would still be subject to CSP.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Upload the Chart.js library as a web file in the portal and reference it locally.
Why this is correct
Uploading the Chart.js library as a web file makes it a local resource, bypassing CSP restrictions on external scripts. This is the recommended solution.
- ✗
Disable Content Security Policy in the portal settings.
Why it's wrong here
Disabling Content Security Policy is not recommended as it weakens portal security; the issue is about loading external scripts, not CSP itself.
- ✗
Configure the web API call to use credentials: 'include'.
Why it's wrong here
The 'credentials: include' option is used for cross-origin requests with credentials, but the web API call to Dataverse is same-origin, so this is unnecessary and does not address the CSP block on Chart.js.
- ✗
Use a different JavaScript library that doesn't require external resources.
Why it's wrong here
Switching to a different JavaScript library does not solve the CSP issue if the new library is also loaded from an external CDN. The problem is the source, not the library.
Go deeper
Related to this question
About these practice questions
One of 904 original PL-900 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PL-900 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PL-900 exam.