Netskope Destination Profile support (Preview)
This preview covers Netskope Secure Web Gateway (NSWG) to Entra Internet Access (EIA) migration. It does not add Netskope Private Access (NPA) to Entra Private Access (EPA) conversion support.
Status and choosing a command
Export-NetskopeConfigPreview and Convert-NSWG2EIAPreview are best-effort experimental
implementations, not yet validated against real Netskope tenants/exports.
They are based on public documentation and API models, with local automated checks using synthetic fixtures and mocked API responses. Those checks are not evidence of real-tenant compatibility or end-to-end migration correctness.
Community validation, corrections, and contributions are welcome. These commands are not a production-ready replacement for the original commands.
Preview denotes validation status, not a GSA object model or traffic forwarding version. The converter still generates the existing GSA V1 CSV contract.
| Existing command (unchanged) | Experimental command (explicit opt-in) |
|---|---|
Export-NetskopeConfig | Export-NetskopeConfigPreview |
Convert-NSWG2EIA | Convert-NSWG2EIAPreview |
Both pairs are exported by the same module. No aliases, forwarding wrappers, or
automatic upgrades redirect existing scripts to the preview. The original commands
retain their current behavior and limitations, including the original converter's
exact Enabled status comparison. The preview converter additionally trims status
whitespace. The original converter does not gain Destination Profile support.
Use matching export/conversion pairs and separate input/output directories. Preview export envelopes are not guaranteed to work with the original converter. Switching back means invoking the original names with their original inputs.
The preview converter accepts URL Lists, Destination Profiles, or both for a tenant in transition. Choose one converter for each migration run; do not independently provision overlapping outputs from both converters.
What the experimental implementation adds
Export-NetskopeConfigPreview keeps URL Lists and Destination Profiles distinct,
retaining url_lists.json and destinations.json. It requests modern Custom
Categories and Destination Profiles using limit=100 and increasing offset,
and saves their combined elements/total_count envelopes with returned fields,
including applied/pending status.
Page failures, missing/repeated IDs, changing totals, or premature empty pages abort export instead of saving an incomplete profile collection. Legacy category responses retain a warning that completeness is unverified. Other endpoints keep their existing best-effort behavior; this is not proof of a complete tenant backup. Export against a stable configuration; pagination does not provide a transactional snapshot. The exporter performs GET requests only, not Netskope apply/migrate actions.
Convert-NSWG2EIAPreview accepts -DestinationProfilesPath in addition to URL Lists.
It supports modern category inclusion/exclusion arrays with separate source ID
namespaces. Missing references and incomplete modern collections stop conversion.
Its existing RTP input still resolves categories by name; duplicate category names
are rejected rather than guessed.
All Destination Profile rule candidates have ReviewNeeded=Yes, Provision=No.
Plain domains remain FQDN candidates; wildcard candidates include root and
subdomains. More complex entries use placeholders, preserving their original
strings in ReviewDetails instead of passing through legacy URL cleanup.
Empty and pending profiles remain visible for review.
For both sensitive and insensitive profiles, plain domain candidates are
lowercased: Netskope documents domain matching as always case-insensitive.
Case sensitivity applies to paths and queries, which remain placeholders with
their original case preserved in ReviewDetails.
The preview accepts an empty values array as an empty profile, but rejects null,
non-string, empty-string, or whitespace-only entries inside a nonempty array.
This is a strict converter input boundary, not a claim that the Netskope editor
rejects blank lines (its documentation treats those as comments). If such entries
appear in an actual export, report the shape rather than silently discarding them.
Modern category reference arrays still require nonempty strings, as specified by
the public SDK; integer IDs on legacy URL List objects are a separate contract.
Security profiles involving modern categories or Destination Profiles also have
Provision=No. Other legacy rules/profiles can still have Provision=Yes; do
not feed preview output into production provisioning without independent validation.
Changing Provision alone does not make placeholders or changed semantics safe.
Try the exporter in an authorized test tenant
If you already have an export, skip to testing the converter with your own export. Otherwise use PowerShell 7 from a repository checkout containing the preview commands. Keep export files outside the repository in a protected folder.
Import-Module ./Migrate2GSA/Migrate2GSA.psd1 -Force
$token = Read-Host 'Netskope read-only API token' -AsSecureString
Export-NetskopeConfigPreview `
-ApiToken $token `
-TenantUrl 'https://your-test-tenant.goskope.com' `
-OutputDirectory (Join-Path $HOME 'netskope-validation/exports')
Use the read permissions listed in the original export guide. Confirm availability, schemas, and pagination against your tenant Swagger. The public SDK informs this implementation; it does not guarantee tenant compatibility.
The exporter writes backup_preview_<timestamp>/ with
Export-NetskopeConfigPreview.log. Its complete-backup metadata identifies the output
as Netskope_Configuration_Preview. Original backups remain separate.
Test the converter with your own export
Prepare your files
Use PowerShell 7, with the current directory set to the repository root, and a
checkout containing these experimental commands. Do not assume the installed
PowerShell Gallery version includes them. The explicit module import below loads
your local checkout. If Get-Command Convert-NSWG2EIAPreview fails after importing,
check the checkout/version rather than substituting the original converter.
Conversion is offline: it needs no Netskope token or GSA login, does not modify the input JSON, and does not provision GSA objects. Work on copies of a consistent export from one tenant; preserve IDs and references across files. Keep inputs, outputs, and logs outside the repository in an access-controlled folder.
| File | Requirement |
|---|---|
real_time_protection_policies.json | Your RTP policies in the converter's existing category-by-name format. Required. |
custom_categories.json | Your matching legacy or modern Custom Categories. Required. |
destinations.json | Complete Destination Profile collection; required to test profile references. A differently named file can be passed to DestinationProfilesPath. |
url_lists.json | Required if your categories still reference legacy URL Lists. |
| Category mapping CSV | Start with the repository's Netskope-to-GSA-CategoryMapping.rename_to_csv; review unresolved mappings in output. |
Neither exporter currently produces real_time_protection_policies.json.
Obtain it separately in the supported format. The
existing sample
illustrates that format; it is not a confirmed current RTP API schema. Do not
substitute sample policies for your own when validating an actual export. If your
RTP schema differs or policies directly target profiles, report that gap rather
than reshaping away unsupported fields to make conversion succeed.
Run locally
Set $inputDir to your prepared export folder (or the exporter backup folder
after adding your matching RTP file). The example assumes both source types are
present. For a profile-only export, remove the -UrlListsPath line only if no URL
List references remain. For URL Lists only, remove -DestinationProfilesPath;
that exercises legacy compatibility, not Destination Profile support.
$env:MIGRATE2GSA_TELEMETRY_OPTOUT = '1'
Import-Module ./Migrate2GSA/Migrate2GSA.psd1 -Force
Get-Command Convert-NSWG2EIAPreview
$inputDir = Join-Path $HOME 'netskope-validation/input' # Change to your export folder.
$outputDir = Join-Path $HOME ("netskope-validation/output-" + [guid]::NewGuid().ToString('N'))
New-Item -ItemType Directory -Path $outputDir -Force | Out-Null
$result = Convert-NSWG2EIAPreview `
-RealTimeProtectionPoliciesPath "$inputDir/real_time_protection_policies.json" `
-UrlListsPath "$inputDir/url_lists.json" `
-DestinationProfilesPath "$inputDir/destinations.json" `
-CustomCategoriesPath "$inputDir/custom_categories.json" `
-CategoryMappingsPath './Samples/NSWG2EIA/Netskope-to-GSA-CategoryMapping.rename_to_csv' `
-OutputBasePath $outputDir
$result | Format-List *
$policies = Import-Csv $result.PoliciesCsvPath
$profiles = Import-Csv $result.SecurityProfilesCsvPath
$policies |
Format-Table PolicyName, PolicyAction, RuleDestinations, ReviewNeeded, Provision -Wrap
$policies | Where-Object ReviewNeeded -eq 'Yes' |
Format-List PolicyName, RuleDestinations, ReviewDetails, Provision
$profiles | Format-List *
Get-Content $result.LogFilePath
RealTimeProtectionPoliciesPath, CustomCategoriesPath, and CategoryMappingsPath
are required. Supply at least one of UrlListsPath or DestinationProfilesPath,
and both when both source types are referenced. Input files and OutputBasePath
must exist. -EnableDebugLogging enables detailed logging.
Profiles accept a direct array or complete elements/total_count collection.
The supported profile match types are sensitive, insensitive, and regex.
Modern categories use included_url_lists, excluded_url_lists,
included_destination_profiles, excluded_destination_profiles, and
included_predefined_categories.
Outputs are <timestamp>_PREVIEW_EIA_Policies.csv,
<timestamp>_PREVIEW_EIA_SecurityProfiles.csv, and
<timestamp>_Convert-NSWG2EIAPreview.log. Return properties remain PoliciesCsvPath,
SecurityProfilesCsvPath, LogFilePath, PoliciesCreated (rule-row count), and
SecurityProfilesCreated.
Check the result before reporting success
Completion means CSVs were generated, not that the source policy was faithfully migrated. Rule-row counts are not policy counts, and your output is not expected to match the synthetic sample's 17 rows and two profiles.
- Trace representative enabled RTP policies through category inclusions/exclusions to the source URL List/profile IDs and then to output rules and profile links. Confirm users/groups, actions, and ordering; investigate missing policies and logged filtering/skips. Direct RTP profile targeting is a known unsupported case.
- Check that every generated Destination Profile row is
ReviewNeeded=Yes,Provision=No, and that affected security profiles areProvision=No. Check preserved source values/status inReviewDetails, including paths, ports, queries, regex, and pending objects. - Review placeholders,
UNMAPPED:entries, and all warnings. A review candidate is not an equivalent target rule. Do not change flags simply to bypass review, and do not run provisioning as part of this walkthrough.
If conversion fails, preserve the error and identify the input shape/reference
involved. Incomplete-collection errors require all pages, not a manually adjusted
total_count. Missing-reference errors require the matching source export, not
deleting the reference. Unsupported schemas should be reported with a sanitized
minimal example. Inspect logs locally; use -EnableDebugLogging only when needed
and treat the extra output as sensitive.
Try synthetic inputs instead
For an offline run without credentials, see the source-backed synthetic fixtures
and walkthrough in
Samples/NSWG2EIA/DestinationProfiles/.
These fixtures are not actual customer exports.
Known gaps
- RTP export and direct RTP Destination Profile targeting are not implemented.
- Numeric predefined-category IDs do not map through the existing name-based CSV; they produce unresolved, non-provisioning rows.
- Applied/pending effective-policy selection still needs tenant validation.
- Ports, paths/queries, case sensitivity, regex, IP/CIDR/ranges, resolved-IP matching, wildcard/root matching, and longest-prefix differences need semantic validation. Exclusions currently generate inverse-action candidates, which may not preserve source policy ordering or exception scope.
- No GSA Filtering Policy Model V2, delta reconciliation, or NPA converter changes are included.
Pending community confirmation: numeric reference arrays
Status: awaiting evidence; not a confirmed bug or a commitment to add numeric-array support. The published modern SDK specifies string IDs. The converter continues to require nonempty string reference arrays and fails explicitly on unsupported shapes.
- Obtain an authorized, sanitized response or tenant Swagger schema for
/api/v2/profiles/customcategories, together with the Netskope release. Confirm the JSON item types ofincluded_url_lists,excluded_url_lists, andincluded_predefined_categories: for example,["22"]versus[22]. - Record the evidence in a GitHub validation issue using the reporting guidance below. If it confirms strings only, document that result and close the question for the verified release; no code change is needed.
- If numeric arrays are confirmed, add narrowly scoped compatibility handling and regression fixtures/tests for the affected fields before relaxing validation. Preserve separate Destination Profile identities and rejection of malformed references; verify export-to-conversion behavior and update the supported-input docs.
Do not implement speculative coercion while evidence is missing. This question is separate from mapping predefined-category IDs to GSA category names, which remains a known conversion gap regardless of whether IDs arrive as strings or numbers.
Help validate
Community validation and contributions are welcome, including reports from existing authorized exports without live tenant access. Use authorized data and open a GitHub issue with Netskope Destination Profile preview validation in the title. Report:
- Module version/commit, PowerShell version, Netskope release, and which preview command ran.
- Expected versus actual behavior, including object counts across pages.
- Whether the tenant uses legacy lists, profiles, or both; applied/pending states; and category inclusion/exclusion or direct RTP references.
- A minimal sanitized reproduction and relevant sanitized errors/output. Include authorized schema details that differ from the public SDK.
Reports of successful runs are useful too: state exactly what you checked and what remains unverified. To contribute a correction, open a focused pull request with a sanitized minimal fixture, a regression test, and an explanation of the confirmed source behavior. Schema corrections, missing-reference handling, matching semantics, and documentation improvements are especially helpful. Follow the repository's contribution guidance; do not remove review safeguards solely because a synthetic test or one export succeeds.
Do not post API tokens, authentication headers, raw debug logs, complete backups, tenant identifiers, user identities, internal destinations, or real customer configurations. Replace sensitive values consistently so references still join. Share only data you are authorized to publish; report schema/count differences without attachments when sanitization is uncertain.
Successful fixture checks do not establish production readiness. Real export coverage, tenant Swagger confirmation, and source-to-target behavior validation are required before promoting the experimental implementation or removing review safeguards.