Read choices (option set) metadata for a Dataverse table field via the Web API
domain: learn.microsoft.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Retrieve the option set definition for a specific picklist field using the metadata API: GET https://<org>.crm.dynamics.com/api/data/v9.2/EntityDefinitions(LogicalName='<entityLogicalName>')/Attributes(LogicalName='<fieldLogicalName>')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?$select=LogicalName&$expand=OptionSet($select=Options).
Parse the Options array in the OptionSet property of the response; each option object contains a Value (integer) and a Label object with a LocalizedLabels array containing the display text per language.
Extract the label for the user's language by matching UserLocalizedLabel.LanguageCode (e.g., 1033 for English US) within the Labels array.
For a global (shared) option set not tied to a single entity, query it directly: GET https://<org>.crm.dynamics.com/api/data/v9.2/GlobalOptionSetDefinitions(Name='<optionSetName>') to retrieve all options.
For multi-select picklists (MultiSelectPicklistAttributeMetadata), use the same pattern but cast to Microsoft.Dynamics.CRM.MultiSelectPicklistAttributeMetadata in the URL.
Cache the option set metadata in your application layer; metadata rarely changes and re-fetching it on every record read adds unnecessary latency.
Known gotchas
The type cast segment (Microsoft.Dynamics.CRM.PicklistAttributeMetadata) in the URL is required — without it Dataverse returns the base AttributeMetadata type which does not include the OptionSet navigation property.
Status and State fields use StatusAttributeMetadata and StateAttributeMetadata types respectively, not PicklistAttributeMetadata — use the correct type cast or you will receive a 404 or empty response.
Option set integer values are stable (do not change when labels are edited), but labels can be localized and changed by administrators; store the integer value as the canonical reference and look up the label at display time.
Give your agent this knowledge — and 15,600+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?