Skip to content

fix(user): update import syntax to require composite format for powerplatform_user resource#1127

Draft
mawasile wants to merge 1 commit intomainfrom
mawasile/1121-importing-an-existing-powerplatform_user-resource-fails-even-when-using-the-documented-import-syntax
Draft

fix(user): update import syntax to require composite format for powerplatform_user resource#1127
mawasile wants to merge 1 commit intomainfrom
mawasile/1121-importing-an-existing-powerplatform_user-resource-fails-even-when-using-the-documented-import-syntax

Conversation

@mawasile
Copy link
Copy Markdown
Contributor

@mawasile mawasile commented Apr 2, 2026

This pull request introduces a breaking change to the import process for the powerplatform_user resource. The import now requires a composite ID in the format environment_id/user_aad_id instead of just the user AAD ID. Documentation and example scripts have been updated to reflect this change, and the import logic has been modified to parse and validate the new format.

Breaking Change:

  • Importing a powerplatform_user resource now requires the composite format environment_id/user_aad_id instead of just the AAD ID. This is a breaking change and users must update their import commands accordingly. (.changes/unreleased/breaking-20260402-143307.yaml)

Documentation and Example Updates:

  • Updated the import example in the documentation (docs/resources/user.md) to use the new composite ID format.
  • Updated the example import script (examples/resources/powerplatform_user/import.sh) to demonstrate the new required format.

Code Changes:

  • Modified the import logic in resource_user.go to parse and validate the composite import ID, extracting and setting both environment_id and aad_id attributes. [1] [2]

@mawasile mawasile requested a review from a team as a code owner April 2, 2026 14:47
Copilot AI review requested due to automatic review settings April 2, 2026 14:47
@mawasile mawasile added breaking change ai assisted Pull requests that have be fully or partially implemented using Copilot or AI labels Apr 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a breaking change to the powerplatform_user resource import format, moving from a single AAD object ID to a composite environment_id/aad_id identifier to support environment-scoped imports.

Changes:

  • Updated powerplatform_user import parsing/validation to require environment_id/aad_id.
  • Updated the user resource import example script to use the composite ID format.
  • Updated generated user documentation and added a breaking-change changelog entry.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
internal/services/authorization/resource_user.go Enforces composite import ID format and sets environment_id + aad_id during import.
examples/resources/powerplatform_user/import.sh Updates import example to environment_id/aad_id.
docs/resources/user.md Updates the documented import example to match the new composite format.
.changes/unreleased/breaking-20260402-143307.yaml Records the breaking change in the changelog system.

Comment thread internal/services/authorization/resource_user.go
Comment thread internal/services/authorization/resource_user.go
@mawasile mawasile marked this pull request as draft April 14, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai assisted Pull requests that have be fully or partially implemented using Copilot or AI breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Importing an existing powerplatform_user resource fails even when using the documented import syntax.

2 participants