0

We are trying to create multiple similar roles and in order to avoid manual clicking and potential human error we would like to create these roles via API. Based on https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/configure.htm Create, Update and Delete should all work with the Configure Request type, which is noted as the correct one on https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/role.htm (along with retrieve).

When using Delete, this does work, but when changing to update or create (as per snippet) this returns the error

<StatusCode>Error</StatusCode>
<StatusMessage>Create is not a valid Role Configure action.</StatusMessage>
<OrdinalID>0</OrdinalID>
<ErrorCode>332001</ErrorCode>

Sample Request body for Create, but Update returns the exact same thing

<s:Body
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <ConfigureRequestMsg
        xmlns="http://exacttarget.com/wsdl/partnerAPI">
        <Options></Options>
        <Action>Create</Action>
        <Configurations>
            <Configuration xsi:type="Role">
                <CustomerKey>Campaign_Manager</CustomerKey>
                <Name>Campaign Manager</Name>
                <Permissions>
                    <Permission>
                        <PartnerKey xsi:nil="true" />
                        <ID>1</ID>
                        <ObjectID xsi:nil="true" />
                        <Name>WebService API</Name>
                        <Description>WebService API</Description>
                        <ObjectType>API Access</ObjectType>
                        <Operation>Access Web Service API</Operation>
                        <IsShareable>true</IsShareable>
                    </Permission>
                </Permissions>
            </Configuration>
        </Configurations>
    </ConfigureRequestMsg>
</s:Body>
0

Salesforce support, after much discussion, advised that roles cannot be created or updated via API

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.