I try to update an existing SQL query activity in Marketing Cloud with SOAP API but I keep getting the same error.

The request I send is this:

<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" 
    <fueloauth xmlns="http://exacttarget.com">{{accessToken}}</fueloauth>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
     <Objects xsi:type="QueryDefinition">
       <QueryText>SELECT SubscriberKey, Email, Is_Action_NL, 
Is_Club_NL, Is_Fashion_NL 
FROM [Prod_Bronze] 
WHERE SendoutCountry = 'SK'
     <PartnerKey xsi:nil="true">
     <ObjectID xsi:nil="true">

I always get back this response:

  <StatusMessage>Exception occurred during [UpdateQueryDefinition] ErrorID: 148844611</StatusMessage>

In the documentation I found this for that Error code:

You may encounter this error code on a SOAP fault during authentication (login has an unexpected exception). Log error information and contact Marketing Cloud support.

So it seems like there is a problem with the authentication. I tried to process my call with token authentication and also with Username/PW authentication. With both authentication types I could perform create requests.

In the QueryDefinition documentation page I found this (and set the permissions accordingly for my API user - with no change in result):

To update a QueryDefinition where the CategoryID is greater than 0, you need the Email | Interactions | Activities | Query | Move permission.

For the Token authentication, I enabled all rights in the API package.

Can anyone help me finding the cause of the error? Do I need to set additional rights? Is there an error in my request?

Thanks for your answers!

Best regards,


2 Answers 2


To successfully update a QueryDefinition using SOAP, I had to include (1)the account's MID and (2)the query activity's ObjectID. I found the ObjectID by hovering over the link to the query activity in Email Studio, down in the browser's status bar — it'll be the "id" query parameter value.

<Objects xsi:type="QueryDefinition">
    <ID>{{ mid }}</ID>
  <ObjectID>{{ id }}</ObjectID>

I came across this post whilst trying to troubleshoot an upsert issue. We had the same error which we solved by creating an MID/Business Unit specific endpoint/package.

With this we noticed we did not need to specify the Client ID

Edit: MID is the company account ID or 'Business Unit' you're assigned in Marketing Cloud. You can find it by navigating to the top bar, then clicking the Down arrow next to your company/account name

Otherwise you can inspect and search for the following:

<div class="pull-right">MID: 11111212</div>

Finding out which package you have assigned to which MID: 1. Nav to top right 2. Click user, dropdown should appear 3. Click Administration (if you don't have access to it, an admin will need to do this) 4. new page will load. Go to Account -> Installed packages 5. Select the package you're using to interact with SFMC from the list 6. look for 'Business Unit'

  • 1
    Can you edit your original post to spell out what MID means? Commented Nov 14, 2018 at 4:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .