List channels of a team including FilesFolder relationship - microsoft-graph-api

I want to use the 'List channels' API call to list all channels belonging to a team and also retrieve the 'filesFolder' relationship in a single request. I'm using the code below with the dot net SDK and v1.0 API endpoint.
await graphClient.Teams[team.Id].Channels.Request().Expand("filesFolder").GetAsync();
When this code executes, it causes an exception: "Microsoft.Graph.ServiceException: 'Message: The query specified in the URI is not valid. Query option 'Expand' is not allowed. To allow it, set the 'AllowedQueryOptions' property on EnableQueryAttribute or QueryValidationSettings.",
but the help states that the $expand parameter is supported: https://learn.microsoft.com/en-us/graph/api/channel-list?view=graph-rest-1.0&tabs=http .
I'd like to use the $expand parameter to potentially avoid many extra calls. Is this a bug? Am I doing something wrong?

So I forgot about this question and I eventually contacted Microsoft Support directly. They informed me that the List Channels API method does not support the $expand parameter and that there are no plans to add support for it and that the help page would be corrected. Looks like the help page still hasn't been corrected yet.

Related

Microsoft Graph API / Power Automate

I am using Graph API to extract all the incidents and advisories from Microsoft but I encounter some issues, and I will be very happy if you can help me.
I am using the GET Method using the URL
https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/issues but in the output, I can see that not all incidents are present, and I can see that there is present pagination in the output https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/issues?$skip=100, can you guys help me how I should filter this to extract all the incidents from the API?
You'll need to make multiple calls until the response provides no further link for you to retrieve further records.
https://learn.microsoft.com/en-us/graph/paging
As is described in the above documentation ...
You can retrieve the next page of results by sending the URL value of the #odata.nextLink property to Microsoft Graph.
As previously stated, once you have reached the last page, you will no longer have a nextLink value to retrieve the next page.

Microsoft graph API: /me/drive/root/search - can't add filters to query

I'm trying to make search request for my OneDrive files with some specific extensions. Only solution I've got right now is to filter out after received response but that's not what I'm looking for.
Query I tried:
https://graph.microsoft.com/v1.0/me/drive/root/search(q='book filetype:xlsx OR filetype:xls OR filetype:svg OR filetype:json OR filetype:txt')
Unfortunately it's not returning anything.
AFAIK, the search endpoint will search the keyword like 'book' with all the extensions and give the driveItem objects as response. You need to filter it on your end which extension you like to pick by writing the code. Please raise a feature request in Microsoft Graph Feedback Forum so that the Product team may implement it in future.

How to fetch GlobalObjectId using List Calendar View Graph API call?

I understand the recommended way to uniquely identify an Outlook meeting is to use the GlobalObjectID (or CleanGlobalObjectId), rather than iCalUID. I am struggling to find a way to extract this value when using Microsoft Graph's CalendarView endpoint
I've read through this page here, and that is what drives my question - MSDN Question on iCalUID vs GlobalObjectId
At present, I am using Microsoft Graph's List CalendarView view date range query params, and $select and $filter OData attributes
While it's true that you should rely on the Event's id, I'm not sure where the concern over iCalUId stems from. Regardless, GloablObjectID is not a property returned from the Outlook APIs.
There is a preview of immutable identifiers for Outlook resources on the beta endpoint but keep in mind that this is not suitable for production use yet.

Microsoft Graph: reportRoot: getMailboxUsageDetail. Filter on lastActivityDate property?

My use case is to get all mailboxes which are not being used actively. So that we can take appropriate action like removing O365 license and free up licenses.
For this, I am using the graph API getMailboxUsageDetail
I am trying to filter out based on lastActivityDate property but not getting expected result. I have 2 questions on this.
Is this the correct way to find all not actively used mailboxes? If not, please let me know what is the correct way?
If yes, is this filter property supported?

MS Graph API GET Group members only get users

Currently i have a request for getting the members of a group. But can someone help my composing a request that only show objects of type microsoft.graph.user so i don't have groups in my group members request?
The current request:
https://graph.microsoft.com/v1.0/groups/GROUPID/members?$select=id,displayName,givenName,mail,surname,userPrincipalName
The standard way to achieve your requirement would be to apply type case such as https://graph.microsoft.com/v1.0/groups/GROUPID/members/microsoft.graph.user?$select=id,displayName,givenName,mail,surname,userPrincipalName. There is currently a bug that fails the above query. Please use query like https://graph.microsoft.com/beta/groups/GROUPID/members/microsoft.graph.user in the meantime as a workaround. Notice the changes in version from v1.0 to beta and the lack of $select. We will soon fix the bug to get the former query working.

Resources