Hi guys,
Need help. I am trying to create a custom python script with has a dependecy on office365 (https://github.com/vgrem/Office365-REST-Python-Client) module. The script was creating REST API calls to SharePoint to update, delete, add items to it. I am using client ID and client secret as Credentials to access SharePoint. The script will be triggered by a Scheduled Search.
I placed the file on $SPLUNK_HOME/etc/apps/<appname>/bin/ both the script and the office365 folder.
When I try to run the script using python scriptName.py on that directory, It is working fine so I expected that It will work the same when the script was triggered from Splunk. But no. I am getting authentication error.
Traceback (most recent call last):
File "sharepoint_fetch_data.py", line 100, in <module>
print ("ingestion error: {0}".format(ctx_auth.get_last_error()))
File "/opt/splunk/etc/apps/sharepoint_connector/bin/office365/runtime/auth/authentication_context.py", line 37, in get_last_error
return self.provider.get_last_error()
AttributeError: 'ACSTokenProvider' object has no attribute 'get_last_error'
Which I am not getting when I run It using python scriptName.py only.
I also tried to run the script using $SPLUNK_HOME/bin/splunk cmd python scriptName.py and the errors were the same. It seems that I am getting the error when running it with Splunk's python. Like blocking the connection or something... I don't know.
Did I missed to do or configure something ? Please help me. Thanks in advance!!
... View more