I need to export Exchange email (on premise) into *.eml file. The API
GET https://graph.microsoft.com/v1.0/users/{user_id}/mailFolders/Inbox/messages/{id}/$value
seems is the appropriate one. But it returns error below.
405 Method Not Allowed
{
"error": {
"code": "ErrorInvalidRequest",
"message": "The OData request is not supported. REST APIs for this mailbox are currently in preview. You can find more information about the preview REST APIs at https://dev.outlook.com/.",
"innerError": {
"date": "2022-02-19T15:22:01",
"request-id": "9118f0dd-8d06-4e2b-9fdb-355123ba6a66",
"client-request-id": "78ed917d-4602-867a-5db4-6615e6c29696"
}
}
}
I also tried the
GET https://graph.microsoft.com/v1.0/users/{user_id}/messages/{id}/$value
but still got same error.
But the
GET https://graph.microsoft.com/v1.0/users/{user_id}/mailFolders/Inbox/messages/{id}
can return result properly. It seems this is not security issue, because this API should already return enough data for constructing the *.eml file.
Any one have advise for this?
From the error it sounds like maybe you have a Hybrid environment https://learn.microsoft.com/en-us/graph/hybrid-rest-support and your trying to export a Message from a Mailbox that is onPrem?. If so that won't work for the onPrem mailboxes because they can only do a limited subset of the graph operations and Mime Export isn't one of the current features (not sure if that is going to change in the future). The only work around I know for onPrem would be to use EWS for those mailboxes https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-export-items-by-using-ews-in-exchange until this feature comes to the Graph for Hybrid mailboxes.
Related
I'm using the Microsoft Graph API to list SharePoint Online sites on a web application. The application uses delegated permissions and runs the following query: https://graph.microsoft.com/v1.0/sites?search=*
On a test tenant, this query returns all the expected sites, but when run on a company tenant, it returns an "item not found" error (below). The company tenant has many sites, so I'm expecting the search query to return results.
{
"error": {
"code": "itemNotFound",
"message": "Item not found",
"innerError": {
"date": "2022-08-18T12:51:06",
"request-id": "zzz",
"client-request-id": "zzz"
}
}
}
The company tenant has sites that were created years ago, so it's unlikely that it's a cache refresh issue.
Running a query for a specific site on the company tenant (https://graph.microsoft.com/v1.0/sites/{TENANT}.sharepoint.com:/sites/{SiteName}) returns its information successfully.
Running the search query in Microsoft Graph Explorer still returns the "itemNotFound" error mentioned above. In the Graph Explorer, I tried consenting to application level permissions incrementally (Site.Read.All, Site.ReadWrite.All, Site.Manage.All, and finally Site.FullControl.All) and the search query still returned the same error.
Given this information, what could make a SharePoint Online site not show up in Microsoft Graph API's site search results?
Note: I suspect the issue I'm facing is the same as described on No results for /sites?search= using Microsoft Graph, but that question has no answer, and I have additional information.
I have tried several times for the past few hours to deal with this but i think it's related to the YouTube Api or some other restriction in place.
I am currently moderating multiple yt channels' comments section through YT API and setting malicious comments in "heldForReview" status if they match specific criterias (scam/spam type of comments)
Since few hours ago i keep receiving the following error:
{
"error": {
"code": 400,
"message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the request's input is invalid.",
"errors": [
{
"message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the request's input is invalid.",
"domain": "youtube.comment",
"reason": "processingFailure",
"location": "id",
"locationType": "parameter"
}
]
}
}
Nothing changed on my end and i'm wondering if there's an issue with the API or i got restricted in any way
There's nothing to indicate any restrictions applied to my account/project so i suspect its not me.
I'd like to specify that i have an api quota of 500k and it did not get reached. Even now after the reset of the quota, i keep getting the error.
The same when I try to use the API developer (https://developers.google.com/youtube/v3/docs/comments/setModerationStatus)
In the past i did get this kind of error, but the requests were processed and the comments were put in the "heldForMorderation" status.
I'm processing a bulk of 80 comments per call.
I am having the same issue with a custom spamfilter that I have written and have also observed that the ability to hide/remove comments is broken in a commercial product (Agorapulse) that I also use.
Neither setmoderationstatus, markasspam or delete are working, basically there is no way to automatically remove the spam comments. (Which is a big problem on my channel)
Basically it looks like something has changed/broken on the API side, as the commands don't succeed even if run directly from the documentation website. (Everything worked fine until about 48hrs ago)
I confirm what has been shared previously.
We encounter some difficulties with markAsSpam, setModerationStatus and delete on youtube#comment domain.
markAsSpam returns systematically 204 but seems to do nothing
got same error than #YT Guard with setModerationStatus endpoint (100% errors)
same as previous point with delete endpoint
I add that I cannot generate 404 anymore with wrong comment ID.
We started to have this error since the November 19th.
Our investigation doesn't reveal anything for the moment, we reproduce with HTTP API requests (Postman) and the online forms 'Try this API' available in reference documentation.
I've been looking around for a bit now and can't seem to find anything related.
I'm trying to get a users "presence" object or something similar for a full day.
I've tried to use delta on the presence call but it doesn't seem to be supported atm.
This feature is under the /beta version in Microsoft Graph.
In Microsoft Graph to get a user's presence information, you need to have delegated permissions Presence.Read, Presence.Read.All and HTTP get query request looks like below
GET https://graph.microsoft.com/beta/users/66825e03-7ef5-42da-9069-724602c31f6b/presence
The output for the above query below:
{
"#odata.context": "https://graph.microsoft.com/beta/$metadata#users('66825e03-7ef5-42da-9069-724602c31f6b')/presence/$entity",
"id": "3ec9bb05-dd2e-4b36-87b0-3a855f4b82ed",
"availability": "Offline",
"activity": "Offline"
}
Please refer to Microsoft documentation for more details.
I am using Microsoft Graph perform file operations on data in OneDrive. I have gained the access token with appropriate scopes and permissions (Files.ReadWrite.All).
A OneDrive user has shared a folder with me, which contains some files. Another user has given me rights to a the folder. I'm trying to move those files into my OneDrive but it doesn't allow me to do so. The client software is able to perform this operation (it might be doing it copy and then delete operation).
However I can copy those shared files into my account, and then later delete the shared one but I want to use the move file API.
I'm requesting along with access token retrieved previously, the request looks like:
https://graph.microsoft.com/v1.0/me/drives/{drive_id}/items/{item-id}
and I'm getting following response:
{
"error": {
"code": "invalidRequest",
"message": "Bad Argument",
"innerError": {
"request-id": "45d8b6a2-345a-44b7-a61e-abababababb",
"date": "2017-12-11T11:22:29"
}
}
}
Can someone please tell me which thing I'm missing?
This isn't a supported operation. You can only move a file within a single Drive, not from one Drive to another. From the documentation:
Items cannot be moved between Drives using this request.
I have an App that is calling MS Graph API, and was working totally fine until 4-5 days ago. Suddenly, I´m getting an issue calling the me/joinedGroups endpoint.
The error is also happening using the Graph Explorer. It works fine with the dummy tenant, and also with other tenants we have, so it seems like something with just one specific tenant.
This is the error message I´m getting:
{
"error": {
"code": "ErrorAccessDenied",
"message": "Unified groups aren´t supported.",
"innerError": {
"request-id": "ae03e478-d6c5-497a-a6e6-2401e6175988",
"date": "2017-08-16T15:30:02"
}
}
}
I don´t think is a permissions issue, as it is working fine on other tenants. I can also call the /groups endpoint (and some others) successfully. So, if I can get all the groups, I should be able to get my joined groups.
I got attention from the great Yina Arenas (thanks again), from MS, and she asked me to post the issue here
Both of the following are working for me in graph explorer, and they are fully supported.
You can use both of these alternatives *(not the same thing):
https://graph.microsoft.com/v1.0/me/joinedgroups
https://graph.microsoft.com/v1.0/me/memberof
Option 1 is more directed to "UnifiedGroups", while Option 2 is directory objects, and would give you more back than you likely expect.
That error may be because groups are not enabled in a tenant. I haven't played around with graph explorer extensively, I wonder how or if you had signed into into graph explorer. Depending on the circumstances, that this could have caused such an issue for example if you were signed into a tenant with the feature blocked. It does seem to work fine now, regardless. If this comes up try it in an inprivate browser to make doubely sure.