Views:

Applies to Product - Power Pages


What’s happening?
Customers are unable to deactivate Copilot from rendering on specific pages within Power Pages or the home screen, leading to its visibility across all pages when it should only appear on selected ones.


Reason:
The underlying cause is related to the lack of available settings in the Power Platform Admin interface to disable Copilot for Power Pages, similar to the functionality available for Power Apps.


Resolution:
To hide or disable Copilot on specific pages in Power Pages, the following steps can be taken:

  1. Using CSS (Hides Copilot UI Elements):
  2. Navigate to Power Pages Studio or the relevant application.
  3. Go to the specific webpage where you want to hide Copilot.
  4. Add the following CSS to the Custom CSS section or inside a <style> tag in your page's HTML: css .copilot-container, .copilot-button, .copilot-chat {display: none !important;}
  5. This CSS targets the Copilot UI elements and hides them. If the class names change, inspect the page using browser developer tools and update the selectors accordingly.
  6. Using JavaScript (Removes Copilot from the DOM):
  7. Navigate to the webpage where you want to hide Copilot.
  8. Add the following JavaScript in the Custom JavaScript section or inside a <script> tag: javascript document.addEventListener("DOMContentLoaded", function() { let copilotElement = document.querySelector(".copilot-container"); if (copilotElement) { copilotElement.style.display = "none"; // Hide the element // Or remove it completely // copilotElement.remove(); } });
  9. If Copilot loads dynamically, consider adding a delay: javascript setTimeout(function() { let copilotElement = document.querySelector(".copilot-container"); if (copilotElement) { copilotElement.remove(); } }, 3000); // Wait 3 seconds before removing
  10. Apply It to Specific Pages:
  11. To hide Copilot only on certain pages, modify the script to check the URL: javascript document.addEventListener("DOMContentLoaded", function() { if (window.location.pathname.includes("/your-specific-page")) { let copilotElement = document.querySelector(".copilot-container"); if (copilotElement) { copilotElement.remove(); } } });
  12. Replace "/your-specific-page" with the actual page URL path.
  13. Hard Refresh:
  14. After making changes, users may need to perform a hard refresh or clear their browser cache to see the updates.
  15. Internal Disabling:
  16. If Copilot is enabled across all environments, internal teams may need to disable it at the organizational level, similar to previous actions taken for Power Automate.
If the above steps do not resolve this, further investigation may be required to ensure that the correct settings and scripts are applied.