Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Python Script File For Sentinel Azure Function

SS
New Contributor III
New Contributor III

Hi,

Is there a python script file available of the script to create Azure functions provided in the Sentinel integration guide which we can download?

Thank you.

3 REPLIES 3

SS
New Contributor III
New Contributor III

@adarshk my ask is a bit different. Thank you for your inputs.

rushikeshvartak
All-Star
All-Star

Sample

import logging
import azure.functions as func

def main(req: func.HttpRequest) -> func.HttpResponse:
logging.info('Python HTTP trigger function processed a request.')

name = req.params.get('name')
if not name:
try:
req_body = req.get_json()
except ValueError:
pass
else:
name = req_body.get('name')

if name:
return func.HttpResponse(f"Hello, {name}. This HTTP triggered function executed successfully.")
else:
return func.HttpResponse(
"Please pass a name on the query string or in the request body",
status_code=400
)


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.