Office 365 unified API error when deleting a calendar - ms-office

Today I was playing with the new (beta) Office 365 unified APIs and I noticed a very strange behaviour, possibly a bug on Microsoft side.
When I try to delete a calendar using the unified APIs I get a 409 error, the same I get when I try to create a new calendar passing a name which already exists. Here below the REST details.
Request:
DELETE https://graph.microsoft.com/beta/me/calendars/AAMkAGZlO...6AAA= HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJ...
Host: graph.microsoft.com
Response:
HTTP/1.1 409 Conflict
{"error":{"code":"ErrorFolderExists","message":"A folder with the specified name already exists."}}
According to the specs (https://msdn.microsoft.com/office/office365/APi/calendar-rest-operations#Deletecalendars), 204 should be returned.
Is there a way to create a bug on Microsoft side, such as a bug tracker?
Thanks a lot in advance

This has been Service Exception processing request.
Code: ErrorFolderExists,
Message: A folder with the specified name already exists., Retry
The reason for this error, is that the source platform has a native folder - 'Notes' for example, and the destination Exchange / Outlook also has a native Notes folder, but only for Outlook Notes.
Solution
Therefore the source folder needs to be renamed for a migration to work.

Related

python MSAL patch request "The OData request is not supported" marking message as read

my application has Mail.Read.Write permission for MS graph API and the application has restrict policy on exchange online . The restriction is for a security group and the mailbox folder i am trying to access is a member of that security group. get and post methods are working fine only problem is with patch . I need to mark some emails as read after processing them.
r2 = requests.patch(request_url2,
data=json.dumps(request_body2),
headers={'Content-Type': 'application/json','Authorization': 'Bearer ' + result['access_token']})
pastebin_url2 = r2.text
print("The pastebin URL is:%s"%pastebin_url2)
the same API works fine from graph explorer has anyone tried using python msal and requests...any help appreciated
Looks like the message Id changes after moving message to a different folder
so i changed my code to first mark the message as Read in Inbox and then move to a another folder instead of the other way around. I tried with ImmutableId but it also changes after moving message to different folder.

Microsoft Graph API - Copying SharePoint file - Item not found

I'm working with Graph API against Microsoft Teams team's SharePoint site.
I'm following the example on this page (https://learn.microsoft.com/en-us/graph/long-running-actions-overview?tabs=http) and have an issue. I'm able to query the location provided by the copy endpoint and get a "Completed" status that also provides a ResourceId. But I'm unable to use this resource id in any queries and only getting "Item not found".
Example of paths tried:
/drives/{driveId}/items/{resource-id-returned-from-monitor-url}
/groups/{groupId}/drive/items/{resource-id-returned-from-monitor-url}
The {driveID} is the driveId specified in the parentReference.DriveId in the copy file body.
I'm using the v1 Graph endpoint to get the file.
Btw, I can see the file fine in the correct folder within SharePoint.
Any ideas?
Regards,
Oskar
I wasn't using the DriveId supplied by the /education/***/setUpResourcesFolder Location header but rather the Drive of the class.
Fixed by using the driveId part of the Location URL.

I'm getting this Docusign Error CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY

One of my colleagues have originally posted this question at Salesforce StackExchange but we were also advised to post it here since there might be more devs familiar here on DocuSign.
We're creating a Salesforce app that sends a PDF file to DocuSign for signing. However, when DocuSign returns the PDF, it gives us an error.
We've configured the DocuSign sandbox to return the document back to Salesforce using the information in this link: https://support.docusign.com/articles/DocuSign-for-Salesforce-Adding-Completed-Documents-to-the-Notes-and-Attachments-New
Here is the error we get in the Docusign logs when it tries to return the document back to Salesforce:
SFIntegration unable to add attachment to SF ID: 8001X000000TvWdQAK,
SF Table: Contract, Error: Unable for insert (ShareType=I)
ContentDocumentLink for Test_Completed.Error:ErrorCode =
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, fields = .Unable to insert
(ShareType=V) ContentDocumentLink for Test_Completed.Error:ErrorCode =
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, fields =
Can anyone help us what is the error all about? Thanks.
I had the similar issue. I changed the version to 39 using 'Reconfigure Login' link for the connection and it worked !
Do you have a salesforce trigger? it's probably failing and then trying to roll back the changes.
Also, check if you have "Use Content Files" checked and what version of the API you're using. If you are using V2.1 with this checkbox - you may be getting this error.
(Later Edit):
You Must install Connect for Salesforce with 39 selected. If you had 21 selected and later change to 39 - that won't work, must have it from the beginning.

How to rename a SharePoint folder using Microsoft Flow

I am running a Microsoft Flow and it says it ran successfully but I am trying to rename a folder and the folder isn't renamed.
I have searched websites for a few days now and there isn't much available for flows that rename folders. All I could find is a flow step 'Send an HTTP request to SharePoint' so I have tried this in various forms.
A folder is copied using a Flow step and named Folder123
Send an HTTP request to SharePoint
Site Address: ............
Method: POST
URI: /_api/web/GetFolderByServerRelativeUrl('............. Name'
Headers
Accept: application/json;odata=verbose
X-HTTP-Method: MERGE
If-Match: *
Body: {'Name' : 'Test123'}
There is no error message, the message is: The flow ran successfully.
The expected result is that the folder that is created should be named 'Test123'.
The actual result is that the folder is still named Folder123, so it wasn't renamed.
You are missing one thing in your body which is OData type value.
Follow below steps, it works.
First, get the folder's OData type with a GET request.
Rest call to get folder oData
Design your rest code as per image
Send HTTP Request to sharepoint - Action
So finally your body call looks like below. Your OData type would be depend on your library configuration.
{ '__metadata': { 'type': 'SP.Data.Shared_x0020_DocumentsItem' },'Title': 'Patel', 'FileLeafRef': 'Patel'}
Reference : https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-folders-and-files-with-rest

Microsoft Flow - Block uploading Video files to a Sharepoint site

I am an owner of a Sharepoint site and want to make sure all members of the site don't upload video files. Since SP doesn't have the ability to filter out files by Type - I want to use Microsoft Flow to do this task.
So I have created this flow which triggers on creation of new file in Documents folder of my SP site. Then it runs a Condition, which checkes the property of "File content type" - if it starts with "video/" - then it should delete the file uploaded. It looks like this:
#startsWith(triggerOutputs()['headers']['Content-Type'], 'video/')
But when I run this Flow, I then get this error:
BadRequest. The request failed. Error code: 'InvalidRequestContent'. Error Message: 'The request content was invalid and could not be deserialized: 'Unexpected character encountered while parsing value: {. Path 'details', line 1, position 455.'.'.
What am I doing wrong?
Unfortunately there is no OOTB way to configure these settings yet. Your workaround to create a flow is just what I would have suggested. Ofcourse you can also still create a workflow that does that but why old fashioned if you already made your experience with flow.
This is a known issue and I would encourage you to vote for that feature here.
In OneDrive you can restrict certain file types from syncing using the poweshell:
Set-SPOTenantSyncClientRestriction -ExcludedFileExtensions "wmf;mp4;mkv"
For your flow I would suggest to make an extra step "get file content" and use the content type you get there for your filter instead of the one from your "triggerOutputs"

Resources