Microsoft 365 tenant · Power Platform, Fabric & Copilot Studio

Disable R and Python visuals in Power BI

When it fails: Users can interact with and share R and Python visuals. Reports can run R or Python scripts written by any author, a code path the organization does not review.

CB-M365-POWER-014mediumactivemanualprofile hardened

Description

The Fabric tenant setting Interact with and share R and Python visuals (R and Python visuals settings) is Disabled. The setting applies to the whole organization and cannot be scoped to groups.

Rationale

R and Python visuals run arbitrary scripts on the service against the report's data. Scripts can embed libraries and logic that the organization does not review, and are a way to process or move data outside the usual Power BI controls. Where no reviewed use case exists, disabling the feature removes this unmanaged code path.

Impact

Reports that contain R or Python visuals show them as unavailable in the service. Data science teams that need these visuals should use Fabric notebooks in governed workspaces instead, or the organization must accept the exception for the whole tenant.

Applies when

Requires: Power BI / Microsoft Fabric

Setting

LocationFabric admin portal > Tenant settings > R and Python visuals settings > Interact with and share R and Python visuals
DefaultEnabled
RecommendedDisabled

Audit

  1. Sign in to Microsoft Fabric (https://app.fabric.microsoft.com) as a Fabric Administrator.
  2. Open Settings > Admin portal > Tenant settings > R and Python visuals settings and expand Interact with and share R and Python visuals.
  3. Check that it is Disabled.
  4. Alternative, read only: in GET https://api.fabric.microsoft.com/v1/admin/tenantsettings, read the entry RScriptVisual (enabled must be false).
  5. Fail if the setting is enabled.

Remediation

  1. Identify reports using R or Python visuals with their owners.
  2. In Tenant settings > R and Python visuals settings > Interact with and share R and Python visuals, select Disabled and Apply. Role: Fabric Administrator.
  3. API equivalent: POST https://api.fabric.microsoft.com/v1/admin/tenantsettings/RScriptVisual/update with {"enabled": false}.

Rollback

Set the setting back to Enabled.

References

Mappings

FrameworkIDRelation
NIST SP 800-53 Rev. 55.1.1CM-7related
NIST SP 800-53 Rev. 55.1.1SI-3related
CISA SCuBA Microsoft 365 Secure Configuration Baselines2.0.0MS.POWERBI.6.1v1equivalent

How this control relates to the other framework's: equivalent, stricter, looser, partial or related.

Threats mitigated

People and lifecycle

Authors
Introduced inv0.1.0
Created, updated2026-10-24, 2026-10-24
Translationsfr