Read and update environment settings

Many settings for the environment are stored as columns in the Organization table.

The organization table has a single row and the OrganizationId primary key value is the same Organization ID value visible in the Power Platform admin center. Find your environment and organization ID

The WhoAmI message response returns the OrganizationId property. Use the organizationid value to retrieve the single row of the organization table. See SDK for .NET WhoAmIRequest Class and Web API WhoAmI function.

Supported settings

The documentation for any feature with settings must document the settings they support changing. Not every column is documented. Only settings described in feature documentation are supported to set.

For example, the following columns are supported because they're mentioned in the feature documentation:

Setting Link to documentation
IsAuditEnabled
AuditRetentionPeriodV2
IsUserAccessAuditEnabled
UserAccessAuditingInterval
Configure auditing
ExpireSubscriptionsInDays Cache Schema data
MaxUploadFileSize
BlockedAttachments
BlockedMimeTypes
AllowedMimeTypes
Files and images overview
PluginTraceLogSetting Tracing and logging
QuickFindRecordLimitEnabled About quick find queries
ShareToPreviousOwnerOnAssign Sharing and assigning
ExpireChangeTrackingInDays Use change tracking to synchronize data with external systems
IsExternalSearchIndexEnabled Search for Dataverse records

Note

This list is not comprehensive. Look in the documentation for the feature you are working with for the settings that feature supports changing.

Unsupported settings

Some columns are explicitly not supported to update directly. For example, you shouldn't try to update the OrgDbOrgSettings column directly. This string column contains multiple XML elements that control behavior for multiple features. If you update this value incorrectly, features that depend on these settings could break. Always use the tools described in Environment database settings to change the values of this column.

Read-only settings

Some settings are available to retrieve but can't be set. These columns have false values for both AttributeMetadata.IsValidForCreate and AttributeMetadata.IsValidForUpdate. You can view the list of read-only columns here: Organization table Read-only columns/attributes.

Note

As with every kind of table, if you try to set a read-only column, the operation does not throw an error. The value you provide to update a read-only column is ignored.

Settings that can be updated are listed here Organization table Writable columns/attributes. Keep in mind that being writable doesn't mean that updating the setting is supported.

Deprecated settings

Some columns represent deprecated settings. You should look at the descriptions of the column in the list of Organization table Writable columns/attributes to determine whether the setting still represents the way to modify the environment behavior. For example, the following columns are deprecated:

Use PAC CLI to retrieve and update settings

You can retrieve and update column values for the organization table row using the SDK for .NET and Web API as you would for any Dataverse table. You can also use the Microsoft Power Platform CLI.

The PAC CLI includes these commands:

When you use the pac env update-settings command, make sure to only update columns that can be updated. If you use this command to set a read-only column, the command will incorrectly report that the change was applied successfully because no error occurred.