System.NotSupportedException thrown when refferencing Azure Marketplace Store Charge API.

%3CLINGO-SUB%20id%3D%22lingo-sub-548724%22%20slang%3D%22en-US%22%3ESystem.NotSupportedException%20thrown%20when%20refferencing%20Azure%20Marketplace%20Store%20Charge%20API.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-548724%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20everyone%20getting%20the%20following%20error%20when%20I%20call%26nbsp%3B%3CEM%3E%22%3CA%20href%3D%22https%3A%2F%2Fconsumption.azure.com%3A443%2Fv3%2Fenrollments%2F%24enrollmentNo%2Fmarketplacechargesbycustomdate%3FstartTime%3D%24startTime%26amp%3BendTime%3D%24endTime%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fconsumption.azure.com%3A443%2Fv3%2Fenrollments%2F%24enrollmentNo%2Fmarketplacechargesbycustomdate%3FstartTime%3D%24startTime%26amp%3BendTime%3D%24endTime%3C%2FA%3E%22%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20works%20fine%20though%20when%20I%20call%20the%20usagedetailsbycustomdate%20API.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CEM%3E2019-05-07T14%3A33%3A45.726%20%5BInfo%5D%20Exception%20at%20line%2021%20message%3A%20System.NotSupportedException%3A%20Specified%20method%20is%20not%20supported.%26nbsp%3B%26nbsp%3B%26nbsp%3B%20at%20System.Management.Automation.ParameterBinderBase.CoerceTypeAsNeeded(CommandParameterInternal%20argument%2C%20String%20parameterName%2C%20Type%20toType%2C%20ParameterCollectionTypeInformation%20collectionTypeInfo%2C%20Object%20currentValue)%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20thoughts%20or%20suggestions%20are%20greatly%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-548724%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-617764%22%20slang%3D%22en-US%22%3ERe%3A%20System.NotSupportedException%20thrown%20when%20refferencing%20Azure%20Marketplace%20Store%20Charge%20API.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-617764%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F338202%22%20target%3D%22_blank%22%3E%40PMatwyuk%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Emarketplacechargesbycustomdate%20startDate%20and%20endDate%20data%20type%20is%20DateTime%20%22Sortable%20DateTime%20pattern%20ISO-8601%22%20and%20in%26nbsp%3Busagedetailsbycustomdate%26nbsp%3B%26nbsp%3BstartDate%20and%20endDate%20data%20type%20is%20string%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

Hey everyone getting the following error when I call "https://consumption.azure.com:443/v3/enrollments/$enrollmentNo/marketplacechargesbycustomdate?startT..."

 

It works fine though when I call the usagedetailsbycustomdate API.


2019-05-07T14:33:45.726 [Info] Exception at line 21 message: System.NotSupportedException: Specified method is not supported.    at System.Management.Automation.ParameterBinderBase.CoerceTypeAsNeeded(CommandParameterInternal argument, String parameterName, Type toType, ParameterCollectionTypeInformation collectionTypeInfo, Object currentValue)

 

Any thoughts or suggestions are greatly appreciated.

1 Reply
Highlighted

Hi @PMatwyuk

 

marketplacechargesbycustomdate startDate and endDate data type is DateTime "Sortable DateTime pattern ISO-8601" and in usagedetailsbycustomdate  startDate and endDate data type is string