I believe this to be a current limitation of the API for picklist fields.
I tried as well to get field metadata for a deactivated picklist value. It didn't come back, even though there is an active
property.
It appears the same problem exists in the REST API with the /describe resource or a tooling API query against FieldDefinition - Obtain the complete list of Picklist values via REST API (both active and inactive)
The limitation even goes to the Apex class. E.g. the following won't return inactive picklist values:
Schema.DescribeFieldResult F = Account.Rating.getDescribe();
List<Schema.PicklistEntry> P = F.getPicklistValues();
System.debug(P);
The Metadata API used to expose a Picklist Metadata type, but for v38.0 and later it switched to ValueSet.
I think most of the problems stem from Picklist
in the older Metadata API not exposing a IsActive property. However, CustomValue, that is used from v38.0 onwards does have a isActive.
Update: I thought that the new Metadata API StandardValueSet would have exposed the isActive
field. However, with the following Metadata API package it doesn't come back.
package.xml for the Account.Rating picklist.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>AccountRating</members>
<name>StandardValueSet</name>
</types>
<version>38.0</version>
</Package>
Response \standardValueSets\AccountRating.standardValueSet
<?xml version="1.0" encoding="UTF-8"?>
<StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
<sorted>false</sorted>
<standardValue>
<fullName>Hot</fullName>
<default>false</default>
</standardValue>
<standardValue>
<fullName>Warm</fullName>
<default>false</default>
</standardValue>
<standardValue>
<fullName>Cold</fullName>
<default>false</default>
</standardValue>
</StandardValueSet>