Filter for dedicated Devices - Graph API - microsoft-graph-api

Struggle to build a appropriate query for GRAPH API to retrieve all dedicated devices:
https://graph.microsoft.com/beta/deviceManagement/managedDevices?$filter=deviceEnrollmentType eq 'appleBulkWithoutUser'
https://graph.microsoft.com/beta/deviceManagement/managedDevices?$filter=enrollmentProfileName eq 'Dedicated'
How can I request specific devices either by enrollmentType or enrollmentProfile Name?
Thanks
Filter is not applied and API returns all devices.

Related

Microsoft Graph API national cloud support to list places

I am trying to use the following US National Cloud URL along with access token to list rooms as per this document https://learn.microsoft.com/en-us/graph/api/place-list?view=graph-rest-1.0&tabs=http.
https://graph.microsoft.us/v1.0/places/microsoft.graph.room?$top=5000
https://dod-graph.microsoft.us/v1.0/places/microsoft.graph.room?$top=5000
I am getting the following error:
org.springframework.web.client.HttpClientErrorException: 400 Bad Request
However it works fine with this global endpoint -
https://graph.microsoft.com/v1.0/places/microsoft.graph.room?$top=5000
Since places API was not supporting I tried to use the graph beta API -
https://graph.microsoft.us/beta/users/{0}/findRooms
This works fine with national cloud end point.But this does not list more than 100 rooms.
Is there any other API which I can use to list the more than 100 rooms which is also supported by national cloud API?

Microsoft Graph List places api not returning updated results

Hello Microsoft Graph Team,
I am using Microsoft Graph Apis. I have added few rooms to the tenant but those are not reflected as part of response for List places api. However, findRooms api which is in Beta gives the updated response.
I am using the below api:
https://graph.microsoft.com/v1.0/places/microsoft.graph.room (Production version)
The standard api gives response after aprrox 12-24 hours.
Could you please help me on this?

MS Graph - How do I list all users from specific OU under my DC?

I'm building a Logic App to list all users from MS Graph.
I can get the list of all users by calling MS Graph API using OAuth authentication in my Logic App but I'm struggling to apply a filter in my custom request in MS Graph.
i.e. I have below structure in my OnPremiseAD:
OU=Site1,OU=Users,OU=TEST,DC=xyz,DC=com
OU=Site2,OU=Users,OU=TEST,DC=xyz,DC=com
OU=Site3,OU=Users,OU=TEST,DC=xyz,DC=com
OU=Site4,OU=Users,OU=TEST,DC=xyz,DC=com
...and I want to list users from OU=Site4 only.
Can someone please help?
https://graph.microsoft.com/beta/users?$filter...???
Based on Custom OU considerations and limitations:
User accounts, groups, service accounts, and computer objects that
you create under custom OUs aren't available in your Azure AD tenant.
These objects don't show up using the Microsoft Graph API or in the
Azure AD UI; they're only available in your managed domain.
So I'm afraid that it's not supported to list the users under an OU via Microsoft Graph API.
See a similar post here.

is it possible to assign a Microsoft Teams App to a user using the Graph API?

I can see the Graph API call to assign a Teams App to a given team, but I can't see a call to assign an App to a given user.
Is this possible using the Graph API?
If not, are there any other ways to perform this programmatically?
https://learn.microsoft.com/en-us/graph/teams-proactive-messaging#install-the-app-for-your-users
This capability is now available via the Graph API

Microsoft.Graph API expand method doesn't work

What I am trying to do is retrieve all users with their managers data
await _client.Users.Request().Select("email, displayname, manager")
.Top(5).Expand(x => x.Manager).GetAsync()
Yet, result is always null (tried few different variations). Does Microsoft.Graph API supports this functionality? Because I've tried same requests through Microsoft.Graph and Azure AD Graph Explorers and only azure one returned manager data
Please refer to thread :
The manager property is a navigation property on a user so you'll have to request that property value for each user.
So currently Microsoft Graph SDK doesn't support retrieving all users with their managers data . You may use Azure AD Graph API as a workaround(https://graph.windows.net/<tenant>/users/?$expand=manager&api-version=2013-11-08). If you want microsoft graph api supports that feature , you can send a feedback in here .

Resources