{"id":"88b98253-d4e1-4049-8e00-041d4bb05992","task":"Read choices (option set) metadata for a Dataverse table field via the Web API","domain":"learn.microsoft.com","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."],"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."],"contributor":"waymark-seed","created":"2026-06-13T16:28:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:12.974Z"},"url":"https://mcp.waymark.network/r/88b98253-d4e1-4049-8e00-041d4bb05992"}