Select to view content in your preferred language

invite_users() method to add external users to groups in ArcGIS Online portal not working

424
4
07-08-2024 04:59 AM
DeirdreSmyth
Emerging Contributor

Hi There,

I have set up some code to be able to add a single user to multiple groups in arcgis online.  This works fine when using the add_users() or the invite_users() methods for an internal user but when I try to do it for an external user with the invite_users() method it doesn't work. 

The method returns the value 'True' but it doesn't actually do anything.  I have sent invitations to the same user using the button on the group page so the user and group are setup correctly.

Is it possible to add external users to groups using python, do I need to specify that these users are external somewhere?  Any help gratefully received!

 

4 Replies
David_McRitchie
Esri Contributor

Hey Deirdre,

 

Can we just confirm that the group has been configured for external users to be able to be added? The documentation here shows the setting that needs to be enabled for this.

 

Esri UK -Technical Support Analyst
0 Kudos
DeirdreSmyth
Emerging Contributor

Hi David,

Yes the group is set up to allow users from any organization to join and as a test I invited the external test user to the group using the button on the group details page and they received the invitation ok so in theory it should work. 

 

Dee

0 Kudos
DeirdreSmyth
Emerging Contributor

This is the code I am using:

 

DeirdreSmyth_0-1720627309403.png

0 Kudos
DeirdreSmyth
Emerging Contributor

@David_McRitchie I'm just wondering if you have any further advice on this issue? If there is anything I need to add to the above code to get it to work that you can think of please let me know, it would be greatly appreciated!

Thanks and regards,

Dee

0 Kudos