Question

I need to retrieve ObjectId of an application I tried following ways 1. Graph Explorer : Sign In-> Gives me server error 2.With URL in the browser: graph.windows.net/abcdef.onmicrosoft.com/… which says -> Authentication_MissingOrMalformedAccess Token missing or malformed. 3 I tried Get method using fiddler -> Gives me same error ->Authentication_MissingOrMalformedAccess Token missing or malformed. Can someone help me for this?

Was it helpful?

Solution

The Graph Explorer isn't working right now for signing in. Also, you're getting errors when hitting those endpoints because you aren't authenticated. You need an access token from AD to be able to see that information, and then you can call the .../applications endpoint for your tenant.

An easy alternative to get the ObjectID is to use the Azure AD Powershell Cmdlets. Go here and scroll down to download the x32 or x64 version. You may need to install this prerequisite first. Once installed, enter the following commands:

  1. $msolcred = get-credential. This will pop up a dialog for you to authenticate to your directory, using the format user@mydirectory.onmicrosoft.com. You must be an admin or it won't work. After you've authenticated, enter the following two lines:
  2. connect-msolservice -credential $msolcred
  3. Get-MsolServicePrincipal

You'll see a list of all of your service principal objects in your directory, including all of your registered applications. Scroll down to the desired one by using the display name.

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top