Get Site collection details - SharePoint APP only Principal

%3CLINGO-SUB%20id%3D%22lingo-sub-1658476%22%20slang%3D%22en-US%22%3EGet%20Site%20collection%20details%20-%20SharePoint%20APP%20only%20Principal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1658476%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20get%20the%20list%20SharePoint%20apps%26nbsp%3B%20that%20are%20registered%20from%20-%20%3CSTRONG%3E%5BSite%20Collection%20URL%5D%2F_layouts%2F15%2FAppRegNew.aspx%3C%2FSTRONG%3E%20page%20and%20their%20sitecollections%3C%2FP%3E%3CP%3EI%20am%20able%20to%20retrieve%20the%20following%20app%20details%20only%20(App%20name%2C%20app%20id%2C%20app%20secret%20and%20expiration%20period)%20using%20MSOnline%20Powershell%20command%26nbsp%3BGet-MsolServicePrincipal%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20get%20the%20Site%20collection%20url%20in%20which%20the%20APP%20Is%20registered%20%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1658476%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20APP%20only%20Principal%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

I am trying to get the list SharePoint apps  that are registered from - [Site Collection URL]/_layouts/15/AppRegNew.aspx page and their sitecollections

I am able to retrieve the following app details only (App name, app id, app secret and expiration period) using MSOnline Powershell command Get-MsolServicePrincipal 

 

Is there a way to get the Site collection url in which the APP Is registered ? 

2 Replies

@Santhosh Sankaran I'm running into the same thing. Nothing out there on this. We'd like to understand who out there in the company are using AppIDs and to which SharePoint Site Collections they are associated.

 

Using Graph API (you can test using https://developer.microsoft.com/en-us/graph/graph-explorer ) you can pull info about a particular AppID, even if it was created from the SharePoint side using /AppRegNew.aspx

 

Problem is there is no owner info in the properties returned when hitting above endpoint. 

Microsoft is allowing you to query for them, and you can even see some details in Azure Portal (when searching using Enterprise Applications under Azure Active Directory) but there is a disconnect with the associated SharePoint site collection.