# Shotgrid event daemon error

**URL:** <https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993>\
**Category:** Flow Production Tracking\
**Tags:** python-api\
**Created:** [July 21, 2021, 12:49am UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993 "2021-07-21T00:49:33Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alam](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Alam](https://community.shotgridsoftware.com/u/Alam)\
**Post date:** [July 21, 2021, 12:49am UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/1 "2021-07-21T00:49:33Z")

</div>

Hello team,

We have migrated the shotgun website to Shotgrid and followed all the procedures mentioned. But the event daemon which we have created is not working with the same script and key which we were using before migration. I am getting the following error while running the same plugin. I tried to run an event daemon with username and password(which is risky) but that is also not working. Need solution urgently,

**Aborted request with Autodesk Identity: Current user must be an Admin logged in with Identity**

Also , Error getting while using login and password,

**Unknown error: Can’t authenticate user**

Thanks  
Alam

---

<div class="post-metadata">

**Author:** ![dietmar.kreider](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@dietmar.kreider](https://community.shotgridsoftware.com/u/dietmar.kreider)\
**Post date:** [July 21, 2021, 1:12pm UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/2 "2021-07-21T13:12:13Z")

</div>

OH, deamon. One more thing I need to check. But I know “things” about user-authenticated Shotgun instance.

```auto
from shotgun_api3 import Shotgun
sg = Shotgun(
    base_url="https://yoursite.shotgunstudio.com",
    login="your.lagacy.sg.login.name",
    password='your legacy sg password',
    auth_token='PTA token by Autodesk'
)

```

Makes no sense, but it’s working…

P.S. I’ve stumbled upon some ADSK guidelines about using API-script authentication, as it also needs a IT/TD attention, but can’t find it. Last few days were horrible.

---

<div class="post-metadata">

**Author:** ![dietmar.kreider](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@dietmar.kreider](https://community.shotgridsoftware.com/u/dietmar.kreider)\
**Post date:** [July 21, 2021, 3:26pm UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/3 "2021-07-21T15:26:30Z")

</div>

Found something.

> Q. What happens to my scripts that use script\_name/api\_keys for authentication? Will they continue to work?  
> Yes. They will continue to work as they did previously, but the status of an “Active” state cannot be changed—only a scripts authenticated with username/password can do that.

But

> Q. Are there changes to the API behavior for my scripts that use script\_name/api\_keys to authenticate?  
> Yes. Scripts that use script\_name/api\_keys to authenticate will not be able to Activate users anymore. If the API tries to create a new Active user, that user is created as Inactive.  
> To activate a user, you must be logged in with your Autodesk Identity and use one of the following methods: 1. Logged in through the ShotGrid user interface. 2. Logged in through scripts using username/password with a configured Personal Access Token.

Found here:  
[https://knowledge.autodesk.com/support/shotgrid/learn-explore/caas/CloudHelp/cloudhelp/ENU/SG-Migration/files/mi-migration/SG-Migration-mi-migration-mi-faq-html-html.html](https://knowledge.autodesk.com/support/shotgrid/learn-explore/caas/CloudHelp/cloudhelp/ENU/SG-Migration/files/mi-migration/SG-Migration-mi-migration-mi-faq-html-html.html)

And it’s actually what I see in my pipeline. The scripts are still working well. It’s something 😃

---

<div class="post-metadata">

**Author:** ![Alam](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Alam](https://community.shotgridsoftware.com/u/Alam)\
**Post date:** [July 23, 2021, 5:41am UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/4 "2021-07-23T05:41:24Z")

</div>

Hello,

Following are the findings,

I have tried following things after creating PTA,

> > > sg.Shotgun(“[https://abc.shotgunstudio.com](https://anibrain.shotgunstudio.com)”, login=“[xyz@abc.com](mailto:rohit.khonde@anibrain.com)”, password=“######”)

\<shotgun\_api3.shotgun.Shotgun object at 0x7f7ba361cd50\>

**This is not working in event daemon**

> > > sg.Shotgun(“[https://abc.shotgunstudio.com](https://anibrain.shotgunstudio.com)”, script\_name=“logArgs.py”, api\_key=“######”)

\<shotgun\_api3.shotgun.Shotgun object at 0x7f7ba36219d0\>

**This is not working in event daemon**

> > > sg.Shotgun(“[https://abc.shotgunstudio.com](https://anibrain.shotgunstudio.com)”, script\_name=“logArgs.py”, api\_key=“######”, auth\_token=“######”)

ValueError: must provide a user login and password with an auth\_token

**This is not working in event daemon**

> > > sg.Shotgun(“[https://abc.shotgunstudio.com](https://anibrain.shotgunstudio.com)”, login=“[xyz@abc.com](mailto:rohit.khonde@anibrain.com)”, password=“######”, auth\_token=“######”)

shotgun\_api3.shotgun.AuthenticationFault: Can’t authenticate user ‘[xyz@abc.com](mailto:rohit.khonde@anibrain.com)’

**This is not working in event daemon**

> > > sg.Shotgun(“[https://abc.shotgunstudio.com](https://anibrain.shotgunstudio.com)”, login=“xyz”, password=“######”, auth\_token=“######”)

shotgun\_api3.shotgun.AuthenticationFault: Can’t authenticate user ‘xyz’

**This is not working in event daemon**

But We still not able to run the event daemon script.

Regards,

Alam

---

<div class="post-metadata">

**Author:** ![mmoshev](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/mmoshev/32/476_2.png) [@mmoshev](https://community.shotgridsoftware.com/u/mmoshev)\
**Post date:** [July 23, 2021, 9:21am UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/5 "2021-07-23T09:21:45Z")

</div>

Here it works fine with a script user.  
Note that `script_name` is the script user name, not the name of a python script.

---

<div class="post-metadata">

**Author:** ![eeight](https://avatars.discourse-cdn.com/v4/letter/e/41988e/32.png) [@eeight](https://community.shotgridsoftware.com/u/eeight)\
**Post date:** [July 23, 2021, 7:04pm UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/6 "2021-07-23T19:04:10Z")

</div>

Sorry for hijacking this thread, I have the exact same error (since the migration to Shotgrid / Autodesk). I am using a **script** (not an user) with the python API. When trying to delete a **disabled user** I get:

`Delete failed for [HumanUser with id=...]: Aborted request with Autodesk Identity: Current user must be an Admin logged in with Identity`

@patrick-hubert-adsk 👆

---

<div class="post-metadata">

**Author:** ![patrick-hubert-adsk](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/patrick-hubert-adsk/32/257_2.png) [@patrick-hubert-adsk](https://community.shotgridsoftware.com/u/patrick-hubert-adsk)\
**Post date:** [July 25, 2021, 5:11am UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/7 "2021-07-25T05:11:14Z")

</div>

Hi @eeight

I will need to double-check this, but from my understanding of our intents, what you describe seems like a bug.

I believe that it should be possible to delete an entity (HumanUser in this instance) using a ScriptName and API Key.

I’ll get back to you (well, to this thread) as soon is I get a chance to try it.

-Patrick

---

<div class="post-metadata">

**Author:** ![patrick-hubert-adsk](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/patrick-hubert-adsk/32/257_2.png) [@patrick-hubert-adsk](https://community.shotgridsoftware.com/u/patrick-hubert-adsk)\
**Post date:** [July 25, 2021, 5:29am UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/8 "2021-07-25T05:29:49Z")

</div>

Hi @eeight

I believe the issue you describe has been fixed by release `v8.27.0.8278 (build 543a616)`. I cannot seem to find the release notes for that version, my apologies.

I’ve done 2 HumanUser delete tests, one on a fully migrated to Autodesk Identity site, and another one on a site in the middle of the transition (with the 2 modes enabled).

In both of my tests, I was able to delete a disabled HumanUser successfully.

So either the issue was indeed fixed with the build I indicated, or there is something missing in my test.

Please let us know if the issue is still there,

-Patrick

---

<div class="post-metadata">

**Author:** ![khonder](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@khonder](https://community.shotgridsoftware.com/u/khonder)\
**Post date:** [July 26, 2021, 10:46am UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/10 "2021-07-26T10:46:00Z")

</div>

My site is migrated and after migration I am getting following error using script\_name and api\_key. This script was working properly over 3 months before migration.

```auto
shotgun_api3.shotgun.Fault: API batch() request with index 0 failed. All requests rolled back.
API update() CRUD ERROR #701: Update failed for [HumanUser.sg_status_list]: Aborted request with Autodesk Identity: Current user must be an Admin logged in with Identity

```

Data :

```auto
[{'request_type': 'update', 'attribute_name': 'sg_status_list', 'entity_type': 'HumanUser', 'entity_id': 1046, 'field_data_type': 'status_list', 'data': {'sg_status_list': 'dis'}}]

```

---

<div class="post-metadata">

**Author:** ![eeight](https://avatars.discourse-cdn.com/v4/letter/e/41988e/32.png) [@eeight](https://community.shotgridsoftware.com/u/eeight)\
**Post date:** [July 26, 2021, 2:08pm UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/11 "2021-07-26T14:08:03Z")

</div>

Still there:  
`shotgun_api3.shotgun.Fault: API delete() CRUD ERROR #701: Delete failed for [HumanUser with id=...]: Aborted request with Autodesk Identity: Current user must be an Admin logged in with Identity`

Like I said I am not using a login / password, but script\_name with api key. The user I am deleting doesn’t have an autodesk identity (added by my script as disabled).

---

<div class="post-metadata">

**Author:** ![patrick-hubert-adsk](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/patrick-hubert-adsk/32/257_2.png) [@patrick-hubert-adsk](https://community.shotgridsoftware.com/u/patrick-hubert-adsk)\
**Post date:** [July 26, 2021, 9:49pm UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/12 "2021-07-26T21:49:57Z")

</div>

Hi @eeight

We are talking about a hosted version of ShotGrid, not a local install, correct ?

Are you using `sudo_as` ?

I am doing things the same way you describe, and I have no problems.  
What permission group is your script ?

-Patrick

---

<div class="post-metadata">

**Author:** ![patrick-hubert-adsk](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/patrick-hubert-adsk/32/257_2.png) [@patrick-hubert-adsk](https://community.shotgridsoftware.com/u/patrick-hubert-adsk)\
**Post date:** [July 26, 2021, 9:50pm UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/13 "2021-07-26T21:50:52Z")

</div>

Hi @khonder

Are you updating the `sg_status_list` to `act` ?

-Patrick

---

<div class="post-metadata">

**Author:** ![eeight](https://avatars.discourse-cdn.com/v4/letter/e/41988e/32.png) [@eeight](https://community.shotgridsoftware.com/u/eeight)\
**Post date:** [July 27, 2021, 1:08am UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/14 "2021-07-27T01:08:34Z")

</div>

**Hosted** version of Shotgrid. I am **not using sudo\_as** , my script was working well before the migration **without this sudo\_as\_login**. Permission group is **API Admin**

When trying to delete an human with sudo\_as\_login admin:  
`shotgun_api3.shotgun.AuthenticationFault: Cannot 'sudo' - user account has 'can_impersonate_this_user' turned off: 'MyAdminUser'` _← how to enable?_

When trying to delete an human with a “normal” user:

```auto
shotgun_api3.shotgun.Fault: API delete() CRUD ERROR #701: Delete failed for [HumanUser with id=...]: Aborted request with Autodesk Identity: Current user must be an Admin logged in with Identity with a valid bound Personal Access Token

```

Like I said pre-migration it was working without the sudo\_as\_login.

---

<div class="post-metadata">

**Author:** ![khonder](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@khonder](https://community.shotgridsoftware.com/u/khonder)\
**Post date:** [July 27, 2021, 4:42am UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/15 "2021-07-27T04:42:50Z")

</div>

Hi @patrick-hubert-adsk,

Yes actually, I want to disable user on certain condition.

-Rohit

---

<div class="post-metadata">

**Author:** ![patrick-hubert-adsk](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/patrick-hubert-adsk/32/257_2.png) [@patrick-hubert-adsk](https://community.shotgridsoftware.com/u/patrick-hubert-adsk)\
**Post date:** [July 27, 2021, 5:33pm UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/16 "2021-07-27T17:33:22Z")

</div>

Hi @eeight

At this point, I will need to look at the logs on you site to see if I can spot anything

Can you share your site name ? Either publicly or via a private message to me ?

-Patrick

---

<div class="post-metadata">

**Author:** ![eeight](https://avatars.discourse-cdn.com/v4/letter/e/41988e/32.png) [@eeight](https://community.shotgridsoftware.com/u/eeight)\
**Post date:** [July 27, 2021, 6:09pm UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/17 "2021-07-27T18:09:32Z")

</div>

@patrick-hubert-adsk How to enable “can\_impersonate\_this\_user” on my admin user?

---

<div class="post-metadata">

**Author:** ![patrick-hubert-adsk](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/patrick-hubert-adsk/32/257_2.png) [@patrick-hubert-adsk](https://community.shotgridsoftware.com/u/patrick-hubert-adsk)\
**Post date:** [July 28, 2021, 1:31am UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/18 "2021-07-28T01:31:21Z")

</div>

@eeight @khonder

So we are confirming that there is indeed a bug. We have created a ticket for it and will be handling it with priority.

As for the question : where is `can_impersonate_this_user` is defined ?  
In the People page, there is a column name “Admins Can Perform Actions As”. This to prevent other people who can use the `Use as Another User` menu to assume the role of an Admin.

 ![Screen Shot 2021-07-27 at 20.39.00](https://global.discourse-cdn.com/shotgunsoftware/original/2X/d/dcfc046a8cdfb593df3d856cea7e46d7e2c88afb.png)  
 ![Screen Shot 2021-07-27 at 20.39.14](https://global.discourse-cdn.com/shotgunsoftware/original/2X/c/c17de0896b34fc956b4b874d3181517b31a371d4.png)

Question for you @eeight : if your script was working without using `sudo_as_login`, why have you changed your code to use it now ?

-Patrick

---

<div class="post-metadata">

**Author:** ![eeight](https://avatars.discourse-cdn.com/v4/letter/e/41988e/32.png) [@eeight](https://community.shotgridsoftware.com/u/eeight)\
**Post date:** [July 28, 2021, 2:01am UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/19 "2021-07-28T02:01:21Z")

</div>

> [@patrick-hubert-adsk](#):
>
> if your script was working without using `sudo_as_login` , why have you changed your code to use it now ?

because it was not working as expected, so tried with sudo\_as\_login. will revert back and wait for the fix 🤞

---

<div class="post-metadata">

**Author:** ![patrick-hubert-adsk](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/patrick-hubert-adsk/32/257_2.png) [@patrick-hubert-adsk](https://community.shotgridsoftware.com/u/patrick-hubert-adsk)\
**Post date:** [July 28, 2021, 2:07am UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/20 "2021-07-28T02:07:27Z")

</div>

Hi @eeight

The ticket is `SG-23426`, which will be mentioned in the release notes when fixed.

-Patrick

---

<div class="post-metadata">

**Author:** ![eeight](https://avatars.discourse-cdn.com/v4/letter/e/41988e/32.png) [@eeight](https://community.shotgridsoftware.com/u/eeight)\
**Post date:** [August 18, 2021, 1:56am UTC](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993/21 "2021-08-18T01:56:42Z")

</div>

Any ETA?

[Next page](https://community.shotgridsoftware.com/t/shotgrid-event-daemon-error/12993.md?page=2)
