Skip to content

Fixed #480 (preview)#489

Open
NowinskiK wants to merge 1 commit into
developfrom
issue-480
Open

Fixed #480 (preview)#489
NowinskiK wants to merge 1 commit into
developfrom
issue-480

Conversation

@NowinskiK
Copy link
Copy Markdown
Member

@NowinskiK NowinskiK commented May 27, 2026

Fix for Issue #480

Root cause: Get-AzDataFactoryV2Dataset (and other Get-AzDataFactoryV2* cmdlets) throw "Unable to deserialize the response" when the ADF service contains objects whose types aren't supported by the installed Az.DataFactory module version. This blocks DeleteNotInSource entirely.

Three files changed/created:

private/AdfPSObjects.class.ps1 (new)

Six lightweight wrapper classes (AdfPSDataset, AdfPSDataFlow, AdfPSPipeline, AdfPSLinkedService, AdfPSIntegrationRuntime, AdfPSTrigger) following the existing AdfPS<SimplifiedType> naming convention. Get-SimplifiedType already strips the AdfPS prefix, so these integrate with Remove-AdfObject's type switch without any changes there.

private/Get-AdfObjectsFromServiceRestAPI.ps1 (new)

A fallback function that lists ADF objects of any given type via the management REST API — same approach already used for credentials via Get-AzDFV2Credential. Returns the appropriate typed wrappers above.

public/Get-AdfFromService.ps1 (modified)

Each Get-AzDataFactoryV2* call is now wrapped in a try-catch. On failure it logs a warning and falls back to the REST API. The happy path (no deserialization issues) is completely unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

delete step fails to serialize dataset response Publish-AdfV2FromJson unable to delete resources on edge cases

1 participant