Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

How to import security roles / privileges / permissions without errors

(0) ShareShare
ReportReport
Posted on by 158

Hi,

I've created some new security roles with associated privileges and permissions in a test environment. I now want to export them and import them to a higher environment.

I've exported the following entities

  • System security role
  • System security privilege
  • System security permissions

But when I attempt to import using those 3 entities I get the following error

SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Violation of PRIMARY KEY constraint 'I_12192STAGINGIDX'. Cannot insert duplicate key in object 'dbo.SYSTEMSECURITYROLESTAGING'. The duplicate key value is [PII data removed].".

SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "OLE DB Destination.Inputs[OLE DB Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "OLE DB Destination.Inputs[OLE DB Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.

SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Destination" (47) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (60). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.

Failed to insert record into staging table. The keys of the record are DEFINITIONGROUP, EXECUTIONID, PARTITION, SECURITYROLEIDENTIFIER. Duplicate records must be removed from the file prior to import.-SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Violation of PRIMARY KEY constraint 'I_12192STAGINGIDX'. Cannot insert duplicate key in object 'dbo.SYSTEMSECURITYROLESTAGING'. The duplicate key value is [PII data removed].".

'0' 'System Security Role' record(s) inserted in staging

I've tried importing with and without the SECURITYROLEIDENTIFIER and SECURITYPRIVILEGEIDENTIFIER fields populated with exported data but no luck either way.

Any suggestions?

Thanks

  • Deepak Agarwal Profile Picture
    Deepak Agarwal 8,566 on at
    RE: How to import security roles / privileges / permissions without errors

    Are you facing same error when trying to export import as XML file.

    pastedimage1674581179113v2.png

  • MBates237 Profile Picture
    MBates237 158 on at
    RE: How to import security roles / privileges / permissions without errors

    No, I haven't created anything in the test environment, the one I want to import into. Steps I followed

    1. Create new security configuration in Dev

    2. Export new security configuration

    3. Import new security configuration to Test (This is what caused the error)

  • Suggested answer
    Deepak Agarwal Profile Picture
    Deepak Agarwal 8,566 on at
    RE: How to import security roles / privileges / permissions without errors

    Did you created manual security role in both environment, if yes you need to check for any common name in both environment which throwing duplicate record error.  Also, have you tried to export manually created role from Security config form itself and import into another environment from same form.

  • MBates237 Profile Picture
    MBates237 158 on at
    RE: How to import security roles / privileges / permissions without errors

    Hi André,

    Thanks for your response.

    I created the roles in a development environment using the security configuration form. I now want to export them from the development environment and import them to a testing environment for UAT. Both environments are on the same version of F&O. I haven't done anything relating to these roles in the testing environment.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,160 Super User 2025 Season 1 on at
    RE: How to import security roles / privileges / permissions without errors

    Hi MBates237,

    Can you clarify what exactly you mean with a higher environment? Is it a next environment in the DTAP street or is it an environment with a higher F&O application version?

    Have you checked if the file contains duplicate values? Was the role with the name mentioned in the error already an existing role in that environment? Is it a role created in Visual Studio or via the Security Configuration form? If it is created via the security configuration form, was the role created in two environments separately and now you want to update one environment? If your scenario is like the last question, the issue is caused by differences in the unique GUID identifier. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans