Hey there Michael
Thats a good question and thanks for using QandA platform.
So when you initially create a ReferenceCreate
object and set its odataId
, the object holds a reference to that URL. bt, when you reuse the same ReferenceCreate
object for both application and service principal owners, it seems that there might be some internal state management issue with the SDK causing unexpected behavior. (I guess)
For a workaround create a separate instances of ReferenceCreate
for each operation. Each instance maintains its own state and doesn't interfere with the other, hope that removves the issue you are facing.
And regarding whether this is intended or not, without knowning the specifics of the Microsoft Graph SDK for Java, it's difficult to say definitively. but, based on the observed behavior and your workaround, it seems like reusing the same instance of ReferenceCreate
for multiple operations might not be properly handled by the SDK, leading to unexpected errors.
If this helps kindly accept the answer thanks much.