Microsoft Graph API python SDK ,creating a enterprise application

108 Views Asked by At

After following https://learn.microsoft.com/en-us/graph/application-saml-sso-configure-api?tabs=python%2Cpowershell-script I'm trying to build a Enterprise Application .

However code block mentions

graph_client = GraphServiceClient(credentials, scopes)

request_body = InstantiatePostRequestBody(
    display_name = "AWS Contoso",
)

result = await graph_client.application_templates.by_application_template_id('applicationTemplate-id').instantiate.post(request_body)

There is no clue to understand how to import InstantiatePostRequestBody method Please can anyone will be able to help

tried randomly importing different packages to test if any of then had InstantiatePostRequestBody method to no avail

1

There are 1 best solutions below

1
esqew On BEST ANSWER

InstantiatePostRequestBody is available as part of the Microsoft Graph Python SDK.

from msgraph.generated.application_templates.item.instantiate.instantiate_post_request_body import InstantiatePostRequestBody

I'm not sure if the lack of documentation is somehow intentional and/or indicative that this isn't supposed to be used directly this way.