I have a requirement to get the properties of a SPN from Azure AD using .NET SDK. I need to validate if SPN is valid SPN in Microsoft Directory or not. How can I achieve using .NET SDK or Microsoft Graph API.
Asked
Active
Viewed 201 times
0
-
ADAL is an authentication library for Azure AD, not an API. It provides a wrapper around the AAD OAuth endpoints and is used to obtain an access token you need to call _into_ other APIs. – Marc LaFleur May 16 '18 at 14:36
-
Thanks @MarcLaFleur Thanks for your response, is there any way we can do it sing .NET SDK or any other way. My requirement is to validate if given string is a valid SPN or not from Microsoft AAD . – Naveen Aggarwal May 16 '18 at 16:52
-
You could use Microsoft Graph or PowerShell. If it's just a couple, you can also just search for it in the Azure AD portal. – Marc LaFleur May 16 '18 at 17:56
1 Answers
0
Utilize Microsoft Graph for this. Once you have access to read directory data, the following rest call will fetch you all the service principals

Kalyan Krishna
- 1,616
- 15
- 19