I've been using the Microsoft Graph API to access Exchange Online (Office365) In-Place Archives.
It's basically an authenticated GET HTTPS request against https://graph.microsoft.com/v1.0/users/user#company.onmicrosoft.com/mailFolders/ArchiveMsgFolderRoot and it used to work fine.
Starting this week (end of April 2020), the same request against the same resource (no change) started failing with:
404 Response: {'error': {'code': 'ErrorInvalidMailboxItemId', 'message': "Item Id doesn't belong to the current mailbox.", 'innerError': {'request-id': '4a339242-9821-42a9-9622-4b1f7cd2c162', 'date': '2020-04-24T10:01:35'}}}
Other mailboxes (not ArchiveMsgFolderRoot) continue to work fine, no problem there. Only In-Place archives are affected.
How do you access In-places Archives from the Graph API now? Can you share an example?
Same here. We are trying to figure out what exactly changed on MS side.
MS removed support for In-Place Archives in API. All options on the internet are not working anymore. We are implementing a workaround.
Support of ArchiveMsgFolderRoot was never an official feature. There was an announcement that archiving is going be changing coming time.
Related
We have a need to post messages programmatically to Teams Channels and found the microsoft.graph.com API that should work for this. Unfortunately the GA release (v1.0) does not support Application Permissions and the only other way to Post a message seems to be to use the ROPC Auth flow, which is not allowed at my company.
After further research I found out that the documentation for the Beta release of this allows for using Application Permissions, which should work great for me. However, even though I added the "Teamwork.Migrate.All" permissions (Granting approved), I am still getting HTTP 401 Unauthorized.
I later found a second documentation page for the Beta release that does NOT specify Application Permissions as allowed for Posting a message in a Channel.
These are the two documentation pages with conflicting information:
https://learn.microsoft.com/en-us/graph/api/channel-post-message?view=graph-rest-beta&tabs=http - Application Permission allowed
https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-beta&tabs=http - Application Permission NOT allowed
Does someone know what is correct?
Also, is there currently any other way to post messages to Teams Channels programmatically?
Side note, the Bearer token I generate work fine for Getting Channel info, but not for Posting messages.
The first documentation is meant for "Create a new chatMessage in the specified channel", wherein the Second documentation is meant for "Create a new chatMessage in the specified channel or a chat". So there is a difference exists
I have a web site that has been using Microsoft accounts for authentication for more than three years. It is a Node web app and is using the passport-windowslive package.
Lately, when users return from login.live.com after logging successfully using their Microsoft accounts, one of two types of errors is received, sometimes:
The provided value for the input parameter 'scope' is not valid. The target '«my web site domain»' does not exist.
or:
The provided value for the 'code' value is not valid. The code has expired.
The error is sporadic. I am unable to reproduce it on my development machine.
As the passport-windowslive package was last changed four years ago and my code has not changed for more than two years, the cause looks like it's at the Microsoft end. What has changed?
Update: The problem is getting worse. Previously, the problem could sometimes be overcome by using an incognito browser session or changing the browser. Now it's happening on all browsers. But I am still unable to reproduce the error when running on localhost (with no http).
Microsoft has changed how its applications can be used for oAuth. They must now be managed from Azure instead of apps.dev.microsoft.com or Microsoft Live.
Existing applications configured in apps.dev.microsoft.com will result in:
AADSTS700016: Application with identifier '000000xxxxxxx' was not found in the directory 'aaaaaaaa-bbbb-cccc-ddd-eeeeeeeeeeee'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.
The passport-windowslive module somehow did not bubble up the error response.
while fetching channels from the team using graph API is not working. It is not working from today. I am getting the following exception.
https://i.stack.imgur.com/tA1Qv.png
I tried the same with code that worked just fine 3h ago to get channels from a specific team. Now I'm getting the same exception. Same Exception when using Graph-Tester.
Coworker tried it aswell with Graph-Tester, apparently it works just fine for her. Seems like its user related. Propably a bug on Microsofts side.
It seems that it could be a bug. I'm confirming that right now GET /teams/[-groupid-]/channels fails for Delegated permission type requests, both for v1.0 & beta with a 400 Bad Request "Failed to execute Skype backend request GetThreadS2SRequest."
However, it's working for me (200) when I use Application permission type in Postman.
It was fixed by the Microsoft Graph team. Now it's working fine. It's not the only problem with channels. It's a problem with team endpoint API. The graph team is fixed the API related issue.
https://graph.microsoft.com/beta/teams/fd7c1****************/channels/19***********************/messages POST on this api is not working. It was working fine until yesterday. GET is still working fine. Post request gives me BadRequest status code 400.
This image is of a graph explorer that is not taking a post request on beta/teams/{teamId}/channels/{channelId}/messages
I found a similar issue when I call https://graph.microsoft.com/beta/teams. I try to create a new team with a json (template) body.
The following properties cannot be set in the initial POST request.
Please set them in a subsequent PATCH request: installedApps.
Thank for your response but I realized that the reason that api(above) did not work for me on that day was becuase I had archived the team before hand on the code. So apparently you can not push any message to channel using graph api once the team is archived. All I had to do was to replace the archive portion of the code to the bottom of the function.
Although this is my concern whether if the Microsoft will push this api to the v1. version or not. I am really worried that they will remove this api from the beta version and my app will break again.
Using Microsoft Graph I am successfully creating subscriptions, but when calling HTTP Patch to https://graph.microsoft.com/v1.0/subscriptions/ with a correct (works through Graph Explorer) json payload of
{ "expirationDateTime": "UTCTIME 2 minutes past current expiration"}
I always get 403 Forbidden as a result.
I have the permissions set (I think) correctly to Files.ReadWrite as per https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/subscription_update. These should be the same permissions as Creating the subscription so can someone help as to why I can create but not update?
The problem you reported should be fixed now. Please let me know if you're still seeing 403s on subscription update requests.
You should set the permission on project config but not only the apps.dev.microsoft or azure app portal.
If you not sure which config file to set, just get started from the official sample code, or just find the keywords "GraphScope" in your project and add the Files.ReadWrite.All.
You get 403 mainly caused by some wrong config. Still need to check on your side. We can just provide the suggestion to assist you.