# Not allowed to add or modify item

**URL:** <https://community.bloomreach.com/t/not-allowed-to-add-or-modify-item/2598>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [June 1, 2021, 2:25pm UTC](https://community.bloomreach.com/t/not-allowed-to-add-or-modify-item/2598 "2021-06-01T14:25:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![asanchez](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@asanchez](https://community.bloomreach.com/u/asanchez)\
**Post date:** [June 1, 2021, 2:25pm UTC](https://community.bloomreach.com/t/not-allowed-to-add-or-modify-item/2598/1 "2021-06-01T14:25:49Z")

</div>

Hello,

Next I am trying to modify a node with the session admin admin in the Javi code and I get the error trace:

> javax.jcr.AccessDeniedException: /content/documents/santander/santander-developer/en\_gb/content/producercontainers/common-apis/apicontainers/name-il.1.0/name-il.1.0/santanderbrxm:producerOrganizationContainer: not allowed to add or modify item

How can I get a session with permissions to write to the JCR repository? I have to do a content migration between environments and I need to write to the repository but I don’t know how to get the session correctly.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/bloomreach1/original/2X/d/d6d866c05b425311e6b2a70de1fa5a8ee7bc0a51.png)

I am using **importTask.createOrUpdateDocumentFromVariantContentNode**

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/bloomreach1/original/2X/f/f37b1613a89a4a52b5fdf76305c3c645f07fe659.png)

Thank you so much

---

<div class="post-metadata">

**Author:** ![Prats](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/prats/32/1928_2.png) [@Prats](https://community.bloomreach.com/u/Prats)\
**Post date:** [May 9, 2024, 8:28pm UTC](https://community.bloomreach.com/t/not-allowed-to-add-or-modify-item/2598/2 "2024-05-09T20:28:18Z")

</div>

@asanchez were you able to resolve?
