"You do not have permissions ..." when trying to send a notification

10-11-2021 11:53 PM
New Contributor III

I am trying to send a notification to a specific user on our ArcGIS Portal Server using Python, but get an error.

I am able to "login" and get the user,


from arcgis.gis import GIS

gis = GIS(url="https://???.?????.???/portal", username="???", password="???")

daniel = gis.users.get("???")


 but when I try to send a notification


gis.users.send_notification([daniel], "Hello", "Test", type="email")


I get the following error:


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ArcGisPro\conda\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 2363, in send_notification
    return self._portal.con.post(url, params)['success']
  File "C:\ArcGisPro\conda\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 720, in post
    force_bytes=kwargs.pop('force_bytes', False))
  File "C:\ArcGisPro\conda\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 514, in _handle_response
    self._handle_json_error(data['error'], errorcode)
  File "C:\ArcGisPro\conda\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 536, in _handle_json_error
    raise Exception(errormessage)
Exception: You do not have permissions to access this resource or perform this operation.
(Error Code: 403)


Any idea what's the problem?

Thanks and regards,


0 Kudos
3 Replies
Esri Esteemed Contributor

Hi @dstrigl,

Did you update the Email Settings in the Portal Administrator Directory?


0 Kudos
New Contributor III

Yes, and sending the test mail works fine!

0 Kudos
New Contributor II

Getting the same error when attempting to send a built in type notification as an admin using Portal v10.7.1. I see the email configuration references 10.8.1.

Can we send built in notifications using Portal 10.7.1?

0 Kudos