General Exception Microsoft Graph API OfficeConversion_ConverterInternal - azure

I've been calling this endpoint for the last month or so by converting my word document into a pdf and its been working fine:
https://graph.microsoft.com/v1.0/drives/{drive_id}/root/children('example.docx')/content?format=pdf
I tried this today and it seem that i don't get the pdf as a response but rather:
{
"error": {
"code": "generalException",
"message": "Error from Office Service. Url=https://wordcs.officeapps.live.com/document/export/pdf HttpCode=NotFound cert=subject:;thumbprint: ResponseHeaders=Connection: close\r\nDate: Wed, 27 Jan 2021 14:14:23 GMT\r\nServer: Microsoft-IIS/10.0\r\nX-Powered-By: ASP.NET\r\n",
"innererror": {
"code": "OfficeConversion_ConverterInternal"
}
}
}
I followed these docs from Microsoft but with no help :/
https://learn.microsoft.com/en-us/graph/api/driveitem-get-content-format?view=graph-rest-1.0&tabs=http
When i don't use the format parameter to fetch the pdf conversion i can successfully get a response (200) from the original file atleast:
https://graph.microsoft.com/v1.0/drives/{drive_id}/root/children('example.docx')/content
Have the Microsoft Graph API been updated recently?
Also i do have all Azure access and all of that since this has been working fine for the past month so I'm almost certain the API has changed or perhaps my domain got blocked or something...

please check now. The issue has been resolved.

Related

How do you update your profile picture using Microsoft Graph API?

I'm experimenting on Microsoft Graph API to update the profile picture.
Although there is a documentation about it (See Link Here: https://learn.microsoft.com/en-us/graph/api/profilephoto-update?view=graph-rest-1.0&tabs=javascript), I can't seem to understand it.
I tried sending a random data to see if something would work, however I can only get the GET Method to work but somehow trying to make the PUT Method work returns an error.
{
"error": {
"code": "ErrorInsufficientPermissionsInAccessToken",
"message": "Exception of type 'Microsoft.Fast.Profile.Core.Exception.ProfileAccessDeniedException' was thrown.",
"innerError": {
"date": "2022-04-15T07:10:11",
"request-id": "********-****-****-****-************",
"client-request-id": "********-****-****-****-************"
}
}
}
Basically the two concerns are:
How to use the PUT Method for updating the profile picture using Microsoft Graph API
Why am I receiving the error as if I'm not allowed to update?
Is it because I'm doing the PUT Method incorrectly?
Is it because I need some sort of subscription to use the API?

Working with Sharepoint Online Excel files in Graph API

I got quite far following the hints from Pulling Excel.xlsx workbook from Sharepoint site using Microsoft Graph API but now I am stuck and would appreciate some help.
I want to call the Graph API Excel endpoint from a Power Automate flow and first I am testing things in the Graph Explorer but cannot get beyond a point.
What works (and confirms that the file's "mimeType" is "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"):
https://graph.microsoft.com/v1.0/sites/<tenantid>.sharepoint.com:/sites/<siteid>:/lists/<listid>/items/19/driveitem
But when I try this:
https://graph.microsoft.com/v1.0/sites/<tenantid>.sharepoint.com:/sites/<siteid>:/lists/<listid>/items/19/driveitem/workbook
... it generates error:
{
"error": {
"code": "-1, Microsoft.SharePoint.Client.InvalidClientQueryException",
"message": "The parameter name path is not valid.",
"innerError": {
"date": "2020-10-22T08:04:16",
"request-id": "aad38960-538d-4a5b-b3c6-097d19f07b09",
"client-request-id": "a029dea8-f9f9-9a04-d4a3-7901be8d1eca"
}
}
Any suggestion?
Thanks!
P
Can you please have a try below endpoint?
https://graph.microsoft.com/v1.0/sites/<siteid>/lists/<listid>/items/8253/driveitem/workbook/worksheets
Below is my test:

Graph Delta API for groups returning 400 "Resource not found for the segment 'contacts'."

I develop an integration with Azure Ad which supports incremental synchronisations of users and groups.
It worked fine for quite a long time, but recently some (not all) of my customers started encountering one specific error.
For a request like:
GET https://graph.microsoft.com/v1.0/groups/delta?$skiptoken=<TOKEN_FROM_PREVIOUS_SYNCRHONISATION>
The API returns a response with status code 400 and body:
"error": {
"code": "BadRequest",
"message": "Resource not found for the segment 'contacts'.",
"innerError": {
"request-id": "<SOME-REQUEST-ID>",
"date": "2019-02-27T20:01:16"
}
}
I want to point out that this error occurs for some specific customers and I was not able to reproduce it on my environment.
Could someone give me a hint or two what could be causing this error?
Make sure you are using skip tokens and delta tokens correctly.
You should only have a skip token when you get the next page of a delta response.
Later when you want to get changes, you have to use a delta token.
So $deltaToken instead of $skipToken.
Like the delta link here: https://learn.microsoft.com/en-us/graph/delta-query-events?view=graph-rest-1.0#sample-third-and-final-response
I have the exact same problem when I send a request to the following endpoint
GET https://graph.microsoft.com/v1.0/groups/delta?$select=id,displayName,description&$expand=members
However, it works if I remove the "$expand=members" parameter from the URI. Could that be what's causing it in your case too?
After couple of days, my customers stopped raising the issue, so I believe the problem was temporary and on Azure side.

Does ms graph API support outlook on office 365 on Germany endpoint?

I found that graph API in Germany endpoint seems not to support
GET /users/<id>/mailFolders/delta
it returns
**400**
{
"error": {
"code": "ErrorInvalidIdMalformed",
"message": "Id is malformed.",
"innerError": {
"request-id": "cf713386-f050-40b4-b987-43cc2384eade",
"date": "2017-12-12T07:13:10"
}
}
}
However it works fine at
GET /users/<id>/mailFolders
Thanks for help
I had been in the same trouble, but I resolved.
Your request to:
GET /users/<id>/mailFolders/delta
is not correct, I think.
I guess that this mail folder delta was made by you, doesn't it?
To specify a mail folder, you need to use folder id, not display name.
Though you might already get the folder id, you can get the folder id by sending a request
GET /users/<id>/mailFolders
Note: Actually, we can get folder_ids via powershell:
Get-MailboxFolderStatistics
cmdlet on Exchange. However, these folder_id are malformed in ms-graph request. So you need to use the id which you can get as described above.

expand=fields($select=***,****) on the SharePoint Graph resource doesn't work and how about filtering?

I'm playing with the microsoft graph and especially the sharepoint beta api and i am constantly running into issues. I know its beta, but still;)
I'm getting out my expanded fields but i'm not able to select other than id.
/items?expand=fields(select=id) <-- works
/items?expand=fields(select=Title) <-- fails with response being
{
"error": {
"code": "invalidRequest",
"message": "The request is malformed or incorrect.",
"innerError": {
"request-id": "f460cded-46da-468c-a027-f027707a62fc",
"date": "2017-05-10T09:00:10"
}
}
}
Further on trying to filter the request with the request /items?expand=fields&$filter=fields/id eq '421' doesn't work and after a long period just returns a response without taken the filter into account.
Can someone respond if the experience the same or if my syntax is wrong or whatever would be nice. Thanks in advance. Ole Bergtun
i changed /items?expand=fields(select=Title) to /items?expand=fields(select%3DTitle) and it works for me.

Resources