dotnet / dotnet/docs

Unclear which service principal to choose when using managed identity and/or deployment slot

Open
#41,811 0 comments 0 reactions 0 assignees View on GitHub
:watch: Not Triaged dotnet-azure/svc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
15h 21m
Merged PRs (30d)
370

Description

### Type of issue

Missing information

### Description

If your NET app has deployment slots or a system-assigned managed identity, it appears twice in the list of Enterprise Applications to add to a security group when following the steps on this page.

![image](https://github.com/user-attachments/assets/f3d01016-4d2a-402d-bf19-324af376f2a5)

I'm not sure if it is the the deployment slot or the managed identity that causes the second entry, but it is not at all obvious which one to choose. Both entries appear as 'Enterprise Application' with exactly the same name. The GUID in Details is not the Object ID.

If you want to directly assign the app a role on the resource instead of through a security group, it also appears twice in the list of service principals to add a role assignment.

![image](https://github.com/user-attachments/assets/102329a4-0bdc-4dbd-89ed-47a9f99b56c2)

Here it is even more difficult to find the right entry to add.

It takes a lot of trial-and-error, and searching through concealed Object- and Application IDs to find the correct service principal to assign access to. Maybe it would be worthwhile to explain where the second entry comes from, or how to choose the correct one in order to avoid confusion.

### Page URL

https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/local-development-service-principal?tabs=azure-portal%2Cvisual-studio%2Ccommand-line

### Content source URL

https://github.com/dotnet/docs/blob/main/docs/azure/sdk/authentication/local-development-service-principal.md

### Document Version Independent Id

5f9196ed-1c42-99b8-5b04-05a9840f637e

### Article author

@alexwolfmsft

### Metadata

* ID: 20964cc4-7216-3e08-d007-4df16080e4eb
* Service: **dotnet-azure**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.