microsoftgraph / microsoftgraph/msgraph-bicep-types

Unique name for Microsoft.Graph/servicePrincipals type does it makes sense?

Open
#128 7 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

enhancement triaged
Dominant language
TypeScript
Stars
80
Forks
15
Avg merge
1h 21m
Merged PRs (30d)
3

Description

Is your feature request related to a problem? Please describe.
This will be more of a question and may be after answered depending on the answer a feature request.
I am not so deep into Microsoft Entra but my understanding is that SP is like child resource of Application.
However as far as I could read the documentation you can have Application in Tenant A and SP for that application in Tenant B.
With that said let's say I want am creating Application App1 in Tenant A via Bicep. To create the SP SP1 in TenantB I need to provide the appId as input for the resource. In this case I cannot use existing syntax as the App1 is another tenant, correct?

We now assume that App1 is created in tenant A and SP1 is created in Tenant B.
Now I want to create group GP1 and add SP1 as member GP1. In this case in order to get the ID of SP1 I need to use existing syntax and provide the appId as input as App1 is in Tenant A and I cannot use existing syntax for it. If that is the case it would make sense that the servicePrincipals resource also have uniqueName property and you can use two ways to reference it:

  • Option 1- where you provide the Application unique name to existing syntax and use the appId to get the SP existing resource.
  • Option 2 - I can use the unique name of the SP to reference it in existing syntax.

If this assumption is correct I think it makes sense that servicePrincipals also have uniqueName property and you can either provide uniqueName or appId in existing syntax and when deploying/applying the resource.

If the above is not true may be when you have multi-tenant application in Tenant A and that one also creates the same or similar application in tenant B which serves as connection for the Service Principal.

Describe the solution you'd like
N/A

Additional context
N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.