0

I want to automate application creation in Azure with python. My goal is to execute it with AWS Lambda.

I have found ApplicationsOperations class, but I don't understand how to use it.

For the client part it's ok with a GraphRbacManagementClient object

But for config, serializer and deserializer parameters I don't know how to construct them.

Is someone here has code sample for ApplicationsOperations ?

arnaud beun
  • 11
  • 1
  • 2

1 Answers1

0

You don't use it directly, you create a GraphrBac client and you use the "applications" attribute:

https://learn.microsoft.com/en-us/python/api/overview/azure/graph-rbac?view=azure-python

from azure.graphrbac import GraphRbacManagementClient   
from azure.common.credentials import UserPassCredentials    
credentials = UserPassCredentials(  
    'user@domain.com',      # Your user 
    'my_password',          # Your password 
    resource="https://graph.windows.net"    
)   
tenant_id = "myad.onmicrosoft.com"  
graphrbac_client = GraphRbacManagementClient(   
    credentials,    
    tenant_id   
)

apps = list(graphrbac_client.applications.list(
    filter="displayName eq 'pytest_app'"
))
Laurent Mazuel
  • 3,422
  • 13
  • 27