Help getting python runbook (azure automation) to access microsoft graph (sharepoint files)

Grant Fullston 25 Reputation points
2024-05-07T07:03:07.2066667+00:00

Hi all,

I would love some help trying to get my python runbook to access my microsoft graph. I have followed this tutorial (https://learn.microsoft.com/en-us/entra/id-governance/identity-governance-automation) and have tested my certificates with a powershell runbook and got the success message.

I am now trying to configure a python implementation, however am getting stuck on what modules i need, how to install them and how I use the credentials of the certificate in a python script to access sharepoint files.

Any help would be much appreciated and some sample code would be lovely. (I am also having issues with python package dependency installation through import_py3package_from_pypi.py as it says i dont have permissions (ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\userenv\scripts\pip.exe' Consider using the --user option or check the permissions.) however I have the Contributor role assigned to the Azure Automation account.

It was suggested earlier to add virtual machine contributor role but i dont have this available as an option in my azure automation access control panel.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,776 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,138 questions
0 comments No comments
{count} votes