web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Is it legit to set the...
Power Apps
Suggested Answer

Is it legit to set the column requirement level to `SystemRequired` via the Dataverse API?

(1) ShareShare
ReportReport
Posted on by 20
According to MS Learn, I cannot set my custom column to `SystemRequired` on the UI (https://make.powerapps.com/):
Dataverse only enforces the `SystemRequired` option for columns created by the system. Custom columns can't be set to use the `SystemRequired` option. Dataverse doesn't return an error when a column with `ApplicationRequired` applied doesn't have a value.
However, I want to set the column requirement level to `SystemRequired` to force the record insert by the Dataverse API to contain a non-null value for that field. I try to call the Dataverse API to set the column requirement level to `SystemRequired`, and it works:
 
PUT {{_env_url_}}/api/data/v9.2/EntityDefinitions(LogicalName='{{_table_logical_name_}}')/Attributes(LogicalName='{{_column_logical_name_}}')
Authorization: {{token}}
Content-Type: application/json; charset=utf-8
OData-MaxVersion: 4.0
OData-Version: 4.0
MSCRM.MergeLabels: true
{
  "@odata.type": "Microsoft.Dynamics.CRM.StringAttributeMetadata",
  "SchemaName": "_column_schema_name_",
  "DisplayName": { "@odata.type": "Microsoft.Dynamics.CRM.Label", "LocalizedLabels": [{ "@odata.type": "Microsoft.Dynamics.CRM.LocalizedLabel", "Label": "{{_column_display_name_1033_}}", "LanguageCode": 1033 }, { "@odata.type": "Microsoft.Dynamics.CRM.LocalizedLabel", "Label": "{{_column_display_name_1028_}}", "LanguageCode": 1028 }] },
  "RequiredLevel": { "Value": "SystemRequired" },
  "MaxLength": 60,
  "FormatName": { "Value": "Text" }
}

It can block any request that tries to insert a record which is missing that field (400 Bad Request):
 
{
    "error": {
        "code": "0x80040200",
        "message": "Attribute '{{_column_logical_name_}}' cannot be NULL. Source: RequiredFieldValidator.ValidateForCreate, Context: Field is null during Create operation"
    }
}

What I want to ask is:

Is it legit to set the column requirement level to `SystemRequired` via the Dataverse API?
Will Microsoft suddenly change this behaviour and reset the column requirement level of the `SystemRequired` custom columns?
I have the same question (0)
  • Suggested answer
    Valantis Profile Picture
    6,735 on at
     
    Honest answer: it works, but it's technically unsupported.
     
    Microsoft docs explicitly state: "Dataverse only enforces the SystemRequired option for columns created by the system. Custom columns can't be set to use the SystemRequired option." The fact that the API accepts the PUT request and the enforcement works is incidental behavior, not a supported path.
     
    The supported customizations docs confirm: "Customizations made using methods other than those described here are unsupported and could cause problems during updates and upgrades to Dataverse." Setting SystemRequired on a custom column via the API bypasses the UI restriction intentionally, which puts it in unsupported territory.
     
    What does "unsupported" mean in practice for your question:

    - Microsoft could reset or reject this setting in a future update without notice
    - Support tickets related to issues arising from this configuration may be declined
    - Solution imports may strip or override the setting depending on how it's packaged
     
    If you need server-side enforcement of a required field that is more stable, the confirmed supported alternatives are:

    - A pre-validation plugin on Create and Update that checks the field value and throws an InvalidPluginExecutionException
    - A business rule set to enforce the field requirement (though this is form-level, not API-level)
    - For API scenarios specifically, a custom API with built-in validation logic
     
    The plugin approach gives you the same 400 Bad Request behavior you're seeing with SystemRequired, is fully supported, and won't be affected by platform updates.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

  • Suggested answer
    11manish Profile Picture
    3,333 on at
    Your current approach works because the Dataverse metadata API currently permits it, and the platform enforces SystemRequired at a lower level.
     
    However:
    • It is not officially supported for custom columns
    • Microsoft documentation explicitly discourages it
    • Future platform behavior is not guaranteed
    For production-grade solutions, especially enterprise environments, the safer and recommended approach is:

    server-side validation via plugins or custom business logic rather than forcing SystemRequired through metadata manipulation.
  • Valantis Profile Picture
    6,735 on at

    Hi @sam.chiu,

    Just wanted to check in and see if everything is working now. If you still need any help, feel free to let me know.

    Also, if the issue is resolved, it would be great if you could mark the answer as solved so others with the same question can find it easily.

     

    Thanks and have a great day!

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard