Error in documentation for importing service principal #1750
Labels
area/docs
Improvements or additions to documentation
area/import
An issue related to `pulumi import` or the import resource option.
kind/bug
Some behavior is incorrect or out of spec
resolution/fixed
This issue was fixed
Describe what happened
If I follow the documentation for importing a service principal, https://www.pulumi.com/registry/packages/azuread/api-docs/serviceprincipal/#import, then i get a problem with that it does not find the resource. It looks like ServicePrincipal also have got the new id format that
Application
has, and the import worked when i tried to import/servicePrincipals/{objectId}
instead.Sample program
Try using the
pulumi import azuread:index/servicePrincipal:ServicePrincipal example 00000000-0000-0000-0000-000000000000
import command for importing a service principal.Using
pulumi import azuread:index/servicePrincipal:ServicePrincipal example /servicePrincipals/00000000-0000-0000-0000-000000000000
instead does import the resourceLog output
Diagnostics:
pulumi:pulumi:Stack ():
error: preview failed
azuread:index:ServicePrincipal (oasis-dev-appreg-sp):
error: Preview failed: resource '{Object Id}' does not exist
Affected Resource(s)
No response
Output of
pulumi about
CLI
Version 3.144.1
Go Version go1.23.4
Go Compiler gc
Host
OS Microsoft Windows 11 Enterprise
Version 10.0.22631 Build 22631
Arch x86_64
Backend
Name ...
URL azblob://...
User ...
Organizations
Token type personal
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: