Only list custom created Service Principals

%3CLINGO-SUB%20id%3D%22lingo-sub-771087%22%20slang%3D%22en-US%22%3EOnly%20list%20custom%20created%20Service%20Principals%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-771087%22%20slang%3D%22en-US%22%3E%3CP%3EFor%20a%20customer%20I'm%20currently%20in%20the%20process%20of%20analyzing%20the%20impact%20of%20migrating%20several%20subscriptions%20to%20another%20tenant.%20Therefore%20we%20would%20also%20need%20to%20recreate%20several%20service%20principals%20linked%20to%20applications%20that%20will%20be%20moved.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20list%20all%20of%20the%20custom%20created%20service%20principals%20in%20a%20tenant.%20Or%20some%20kind%20of%20list%20of%20all%20of%20the%20%22standard%22%20application%20IDs%20(like%20ones%20that%20are%20used%20by%20Microsoft%20Teams)%20to%20be%20able%20to%20already%20filter%20out%20those.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-771087%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20AD%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EIdentity%20Management%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-771199%22%20slang%3D%22en-US%22%3ERe%3A%20Only%20list%20custom%20created%20Service%20Principals%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-771199%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F381286%22%20target%3D%22_blank%22%3E%40krottiers%3C%2FA%3EYou%20could%20use%20'az%20ad%20sp%20list%20--filter'%20or%20'Get-AzureADServicePrincipal%20-Filter'%20to%20start%20with.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOptionally%20'Get-AzureADServicePrincipal%20%7C%20%3F%20%24_.DisplayName%20-NotContains%20'Microsoft''%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-773762%22%20slang%3D%22en-US%22%3ERe%3A%20Only%20list%20custom%20created%20Service%20Principals%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-773762%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F378345%22%20target%3D%22_blank%22%3E%40Joni_Nieminen%3C%2FA%3E%26nbsp%3BThis%20won't%20correctly%20identify%20the%20custom%20ones%20as%20when%20other%20SaaS%20applications%20are%20connected%20they%20also%20show%20up%20here.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EService%20principals%20don't%20seem%20to%20have%20a%20property%20like%20%22Custom%20Created%22%20for%20example%20to%20clearly%20see%20the%20difference%20with%20the%20ones%20from%20SaaS%20apps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20there%20would%20be%20a%20list%20with%20application%20ID%20from%20the%20major%20SaaS%20companies%20this%20would%20also%20already%20help%20to%20filter%20the%20list.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Deleted
Not applicable

For a customer I'm currently in the process of analyzing the impact of migrating several subscriptions to another tenant. Therefore we would also need to recreate several service principals linked to applications that will be moved. 

 

Is there a way to list all of the custom created service principals in a tenant. Or some kind of list of all of the "standard" application IDs (like ones that are used by Microsoft Teams) to be able to already filter out those.

2 Replies
Highlighted

@DeletedYou could use 'az ad sp list --filter' or 'Get-AzureADServicePrincipal -Filter' to start with.

 

Optionally 'Get-AzureADServicePrincipal | ? $_.DisplayName -NotContains 'Microsoft''

Highlighted

@Joni_Nieminen This won't correctly identify the custom ones as when other SaaS applications are connected they also show up here. 

 

Service principals don't seem to have a property like "Custom Created" for example to clearly see the difference with the ones from SaaS apps.

 

If there would be a list with application ID from the major SaaS companies this would also already help to filter the list.