0
votes

I am using https://docs.microsoft.com/en-us/graph/api/user-list-ownedobjects?view=graph-rest-beta&tabs=cs


  • Azure AD: user-A owns group-A
  • Azure AD: user-A owns application-A

  • the user-list-ownedobjects returns group-A
  • the user-list-ownedobjects does not return application-A

Is this the expected behaviour? Am I missing something... If so, is there a query to get the application owned by user-A?

Regards, Florian

1
I suppose you use the v1.0, just use the beta version instead of v1.0, it will work. sample : GET https://graph.microsoft.com/beta/{id | userPrincipalName}/ownedObjects. - Joy Wang-MSFT
I think @JoyWang is right. I did a quick test using Microsoft Graph Explorer and beta endpoint does work fine.. I would also add that if it's production application related code, then using beta endpoint APIs is not recommended or supported, you may need to look at older Azure AD Graph API https://graph.windows.net - Rohit Saigal
v1.0 doesn't really have application resource type or any of the related APIs, it's only available in beta (docs.microsoft.com/en-us/graph/api/resources/…), and that's probably why you won't get back application type objects back when using the ownedObjects API with Microsoft Graph v1.0 endpoint - Rohit Saigal

1 Answers

2
votes

I suppose you use the v1.0, just use the beta version instead of v1.0, it will work.

Sample :

GET https://graph.microsoft.com/beta/users/{id | userPrincipalName}/ownedObjects.

Also, as @Rohit Saigal mentioned, the application resource type is only available in beta version, and don't recommend you to use beta version in production environment. You may could use AAD Graph instead of it, it also works.

GET https://graph.windows.net/myorganization/users/{id | userPrincipalName}/ownedObjects.