Hello Bill Ehrreich,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that your Azure ML Execute R Script component is having security error.
The error is because you're using the inline R script or unvalidated script bundle which does not meet Azure ML’s security validation requirements. Inline scripts are not validated for security, so avoid it and always use script bundles for:
- Production pipelines
- Sensitive data processing
- External package usage
Therefore,
- Use Script Bundle Instead of Inline Code by:
- Creating a .zip file containing your R script (e.g.,
my_script.R
), - Upload it as a File Dataset in Azure ML Studio,
- Connect it to the Script Bundle input port of the Execute R Script component.
- Creating a .zip file containing your R script (e.g.,
- Always use proper entry point in your script, it must define:
In this link you will find AzureML-R-template on GitHub - https://github.com/microsoft/AzureML-R-templateazureml_main <- function(dataframe1, dataframe2){ source("./Script Bundle/my_script.R") result <- my_func(dataframe1) return(list(dataset1=result, dataset2=dataframe2)) }
- Use CLI or YAML for an advanced R workloads and if designer fails, switch to CLI-based workflows:
- See examples here on how you can achieve it - https://github.com/MicrosoftDocs/azure-ai-docs/blob/main/articles/machine-learning/component-reference/execute-r-script.md
- Define jobs in YAML and deploy using az ml job create
I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.