Is there any way to get the owner of a DE through API or Query?, Currently we have have a SOAP API but this is not bringing us the Owner, this would be the only attribute that does not call
-
DE owner isn't really a concept unless you mean MID the DE is in?– EazyECommented Mar 24, 2022 at 19:56
-
2Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.– Community BotCommented Mar 24, 2022 at 20:00
-
I am trying to extract the information from a DE, among those fields is the owner of the DE according to this documentation, it can be extracted in this way or it just can't be done? developer.salesforce.com/docs/marketing/marketing-cloud/guide/…– JesuchonCommented Mar 24, 2022 at 20:06
-
@EazyE the owner is the person who created the DE and it’s visible in the UI. Unfortunately haven’t tried retrieving it via API.– zuzannamjCommented Mar 25, 2022 at 9:23
-
I wouldn't trust the SOAP documentation. It's very inaccurate and often misleading. It's better to DESCRIBE a SOAP objects and try to retrieve every property. Then remove those that are reported as non-retrievable. Both the DESCRIBE and RETRIEVE can be done easily in Postman.– Adam SpriggsCommented Apr 6, 2022 at 22:09
1 Answer
It seems that it is impossible to retrieve it with currently available endpoints and methods. All in all, Owner field is found but non-retrievable. Here is what I have tried:
- REST API:
GET https://[domain].rest.marketingcloudapis.com/data/v1/customobjectdata/key/[External Key]/rowset
- Retrieves Data Extension data from Custom Object looked up by External Key. Not documented endpoint.
Result: does not mention Owner field at all
<script language="javascript" runat="server">
Platform.Load("Core", "1")
var Retrieve = DataExtension.Retrieve({Property: "Name", SimpleOperator: "equals", Value: "xxx"});
var Owner = Retrieve[0].Owner;
Write(Stringify(Owner));
</script>
Result: variable Owner returns NULL value
<script language="javascript" runat="server">
Platform.Load("Core", "1")
var prox = new Script.Util.WSProxy();
var cols = ["CustomerKey", "Name", "Owner"];
var filter = {Property: "Name", SimpleOperator: "equals", Value: "xxx"};
var data = prox.retrieve("DataExtension", cols, filter);
Write(Stringify(data));
</script>
Result: returns "Error: The Request Property(s) Owner do not match with the fields of DataExtension retrieve"
<script language="javascript" runat="server">
Platform.Load("Core", "1")
var prox = new Script.Util.WSProxy();
var data = prox.describe("DataExtension");
Write(Stringify(data));
</script>
Result: Owner property is not retrievable, thus nothing you can do.
-
Agree. Owner isn't retrievable on any SOAP object, AFAIK. Other API objects retrievable via REST use the
createdBy.id
property. Consistency on those isn't great either. Commented Apr 6, 2022 at 22:06 -
Even though the "CreatedBy" and "ModifiedBy" fields by default have the same user as the "Owner" field when a Data Extension is created, yet it does not guarantee that the "Owner" field will not be changed later on and you will retrieve a wrong value. If you would like to retrieve the "Owner" field directly - it is unavailable.– NikoCommented Jun 4 at 13:27
-
Please go and check available fields when you open a Data Extension, there is a field called "Owner". It is separate from CreatedBy and ModifiedBy. And also do not change the question text please when you are unaware of what was asked.– NikoCommented Jun 10 at 20:26