I am trying to upload files to Sharepoint using O365 Classic Scope authenticated by App Id and Secret.
Our implementation works fine with all sites we have on production, but we receive an error when trying to develop an implementation for a recently created site. I literally used the same code and dependencies as working implementations.
We are using O365 activities 2.8.22 on Studio 2024.10.1 . Are there any recommended configuration that I shall look into or pass on to our System Admin?
Type âMicrosoft.Graph.ServiceExceptionâ cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.
System.Exception: Type âMicrosoft.Graph.ServiceExceptionâ cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required. â> System.Runtime.Serialization.InvalidDataContractException: Type âMicrosoft.Graph.ServiceExceptionâ cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.
Can you try by providing Application Permissions instead of Delegated Permissions for the Graph API in your custom App in Azure App registration and then ask the admin to consent those permissions in Azure?
My suggestion is to try to use the new Upload Activity using Integration Service Connection, as it is the latest one and will receive new features and fixes faster.
There are multiple issues that can be cascading and overlapping with each other.
Alot of these activities have really terrible exception messages.
For example in the Outlook activities, if you add an invalid email address in the send to field it states âAn unknown exception occurredâ, if you make other errors it says âAn unknown exception occurred.â and it keeps going, I think they turn them all into that.
Mercifully, the actual exception, which is very useful, is on the innerexception, but thats not easily seen in the Orchestrator logs, so you need to add custom logging for errors to actually see it.
So you can firstly try adding some try catches around some of the faulting activities, serialize the error and log it, then rethrow the error. These logs can give very valuable insights into the real cause.
Doing this I think will already help diagnose the issue as you can see the real error rather than this one.
As for the serialization error. I believe I reported this last year.
@marian.platonov and @AlexCrijman I can try to dig out my original ticket where I believe I diagnosed it fully and reported it.
If I remember correctly, this error ONLY occurs if you are running a process that you have specified supports persistence and there is some sort of bug that falsely flags something as not serializable.
I am not sure if you are using any persistence, but perhaps you can confirm if that setting is set to true in your project?