microsoft / azure-devops-extension-sdk

Client SDK for developing Azure DevOps extensions
MIT License
122 stars 38 forks source link

Extension Data Store - Uses unclear #105

Open SirFernanders opened 3 months ago

SirFernanders commented 3 months ago

I am trying to use the Extension Data Store shown on this page but I fail to get a data service every time. I have tried many ways but I always get empty null object back from the "getService" function

I followed this documentation https://learn.microsoft.com/en-us/azure/devops/extend/develop/data-storage?toc=%2Fazure%2Fdevops%2Fmarketplace-extensibility%2Ftoc.json&view=azure-devops#settings-storage

and here is example of my code:

SDK.getService<IExtensionDataManager>(SDK.getContributionId()).then(function (dataService){
    dataManager = dataService;
    CheckForEndpointId()

});

Data service is always null. I am guessing it is user error but I just can't figure it out