Hello,
We need to be able to download attachements hosted in dynamics from a third party website.
So far, we are using a custom REST API that will return the needed information using the following:
DocumentManagement::getAttachmentPublicUrl(docuRef)
And that work, this gets me the url and the accesstoken needed to download the file. However, this works only if we are logged into Dynamics, that is to say, of course throught the UI or with Swagger for example. But if I get the link from the other website, or even PostMan, calling my custom REST API, I get a 404.
I noticed that the access token returned with DocumentManagement::getAttachmentPublicUrl(docuRef) includes a UserId among other information. It seems to me that this UserId is set to the Partition when the call is not made from a logged user. Hence the 404.
Would you think of something that I could try? Is the approach wrong.
Thanks for any insight.