python question about importing "msal" module

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

python question about importing "msal" module

L2 Linker

I want to be able to use this module with my automation scripts:

msal:  https://github.com/AzureAD/microsoft-authentication-library-for-python

 

import msal 
by default fails as the module is not installed or available by default.

 

How would i manually correct?

1 accepted solution

Accepted Solutions

L2 Linker

To use a python module in an automation script/integration the module must be installed in the docker container that the automation script/integration is configured to use. Palo Alto Networks provides many prebuilt containers that are available for use. You can see all of the containers here and you can view the docker files that generate those containers here.

 

Looking through the available containers I do not see one with msal installed. This means you would have to use the /docker_image_create command in XSOAR to create a custom container to use for your automation script/integration. You could run something similar to the following command to create a new container with msal available in it:

/docker_image_create msal dependencies=msal

After the image is created you can configure the 'Docker Image Name' setting in your automation script/integration to msal:latest.

View solution in original post

4 REPLIES 4

L2 Linker

To use a python module in an automation script/integration the module must be installed in the docker container that the automation script/integration is configured to use. Palo Alto Networks provides many prebuilt containers that are available for use. You can see all of the containers here and you can view the docker files that generate those containers here.

 

Looking through the available containers I do not see one with msal installed. This means you would have to use the /docker_image_create command in XSOAR to create a custom container to use for your automation script/integration. You could run something similar to the following command to create a new container with msal available in it:

/docker_image_create msal dependencies=msal

After the image is created you can configure the 'Docker Image Name' setting in your automation script/integration to msal:latest.

Thanks for the quick reply

Stupid question where would i run this - 
If i run from a tenant playground do I have to run in every tenant playground, so an image per tenant (i might not understand how this works)

/docker_image_create msal dependencies=msal

  

Assuming that you are using docker, I believe the tenants share the docker images that are on the host. So in a MT environment I would think that you would need to run the /docker_image_create command on at least 1 tenant per host, but I have not confirmed this.

 

You configure the "Docker Image Name" in the settings of your automation script/integration.

tyler_bailey_0-1662137602930.png

 

Got it working, thanks again

  • 1 accepted solution
  • 3004 Views
  • 4 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!