Accessing ServicePrincipal Endpoints in Graph API

Chickering, Ryan 11 Reputation points
2022-07-27T05:50:42.743+00:00

In the Azure Active Directory Graph API it was possible to access the endpoints of all ServicePrincipals by querying https://graph.windows.net/<intuneTenant>/servicePrincipalsByAppId/0000000a-0000-0000-c000-000000000000/serviceEndpoints?api-version=1.6

I am trying to replicate this with the new Graph API. So far, I have read the documentation describing the changes made to Service Principals. I have tried the query https://graph.microsoft.com/v1.0/<intuneTenant>/servicePrincipals to get the service principals and then https://graph.microsoft.com/v1.0/<intuneTenant>/servicePrincipals/{id}/endpoints to try to retrieve the endpoints of a servicePrincipal, but the value is always returned as an empty array. I am looking for a way to either replicate the functionality of the Azure Active Directory Graph API or at least a way to get the SCEP verification service URI.

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vicky Kumar (Mindtree Consulting PVT LTD) 1,161 Reputation points Microsoft Employee
    2022-07-28T09:45:12.777+00:00

    You can't access https://graph.windows.net end point in graph explorer, you can try to run this in postman - https://graph.windows.net/<intuneTenant>/servicePrincipalsByAppId/0000000a-0000-0000-c000-000000000000/serviceEndpoints?api-version=1.6

    If you are trying to get the list of service principle, you can use call GET - https://graph.microsoft.com/v1.0/servicePrincipals?$count=true
    225743-image.png
    for more info about Working with Intune in Microsoft Graph -https://learn.microsoft.com/en-us/graph/intune-concept-overview and https://learn.microsoft.com/en-us/graph/api/resources/intune-graph-overview?view=graph-rest-1.0&preserve-view=true

    Hope this help, please let us know you have any query

    Thanks


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.