Application Class

Active Directory application information.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Inheritance
Application

Constructor

Application(*, additional_properties=None, app_id: str = None, allow_guests_sign_in: bool = None, allow_passthrough_users: bool = None, app_logo_url: str = None, app_roles=None, app_permissions=None, available_to_other_tenants: bool = None, display_name: str = None, error_url: str = None, group_membership_claims=None, homepage: str = None, identifier_uris=None, informational_urls=None, is_device_only_auth_supported: bool = None, key_credentials=None, known_client_applications=None, logout_url: str = None, oauth2_allow_implicit_flow: bool = None, oauth2_allow_url_path_matching: bool = None, oauth2_permissions=None, oauth2_require_post_response: bool = None, org_restrictions=None, optional_claims=None, password_credentials=None, pre_authorized_applications=None, public_client: bool = None, publisher_domain: str = None, reply_urls=None, required_resource_access=None, saml_metadata_url: str = None, sign_in_audience: str = None, www_homepage: str = None, **kwargs)

Parameters

Name Description
additional_properties
Required

Unmatched properties from the message are deserialized this collection

object_type
Required
str

Required. Constant filled by server.

app_id
Required
str

The application ID.

allow_guests_sign_in
Required

A property on the application to indicate if the application accepts other IDPs or not or partially accepts.

allow_passthrough_users
Required

Indicates that the application supports pass through users who have no presence in the resource tenant.

app_logo_url
Required
str

The url for the application logo image stored in a CDN.

app_roles
Required

The collection of application roles that an application may declare. These roles can be assigned to users, groups or service principals.

app_permissions
Required

The application permissions.

available_to_other_tenants
Required

Whether the application is available to other tenants.

display_name
Required
str

The display name of the application.

error_url
Required
str

A URL provided by the author of the application to report errors when using the application.

group_membership_claims
Required

Configures the groups claim issued in a user or OAuth 2.0 access token that the app expects.

homepage
Required
str

The home page of the application.

identifier_uris
Required

A collection of URIs for the application.

informational_urls
Required

URLs with more information about the application.

is_device_only_auth_supported
Required

Specifies whether this application supports device authentication without a user. The default is false.

key_credentials
Required

A collection of KeyCredential objects.

known_client_applications
Required

Client applications that are tied to this resource application. Consent to any of the known client applications will result in implicit consent to the resource application through a combined consent dialog (showing the OAuth permission scopes required by the client and the resource).

logout_url
Required
str

the url of the logout page

oauth2_allow_implicit_flow
Required

Whether to allow implicit grant flow for OAuth2

oauth2_allow_url_path_matching
Required

Specifies whether during a token Request Azure AD will allow path matching of the redirect URI against the applications collection of replyURLs. The default is false.

oauth2_permissions
Required

The collection of OAuth 2.0 permission scopes that the web API (resource) application exposes to client applications. These permission scopes may be granted to client applications during consent.

oauth2_require_post_response
Required

Specifies whether, as part of OAuth 2.0 token requests, Azure AD will allow POST requests, as opposed to GET requests. The default is false, which specifies that only GET requests will be allowed.

org_restrictions
Required

A list of tenants allowed to access application.

optional_claims
Required
password_credentials
Required

A collection of PasswordCredential objects

pre_authorized_applications
Required

list of pre-authorized applications.

public_client
Required

Specifies whether this application is a public client (such as an installed application running on a mobile device). Default is false.

publisher_domain
Required
str

Reliable domain which can be used to identify an application.

reply_urls
Required

A collection of reply URLs for the application.

required_resource_access
Required

Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. This pre-configuration of required resource access drives the consent experience.

saml_metadata_url
Required
str

The URL to the SAML metadata for the application.

sign_in_audience
Required
str

Audience for signing in to the application (AzureADMyOrganization, AzureADAllOrganizations, AzureADAndMicrosoftAccounts).

www_homepage
Required
str

The primary Web page.

Keyword-Only Parameters

Name Description
additional_properties
Required
app_id
Required
allow_guests_sign_in
Required
allow_passthrough_users
Required
app_logo_url
Required
app_roles
Required
app_permissions
Required
available_to_other_tenants
Required
display_name
Required
error_url
Required
group_membership_claims
Required
homepage
Required
identifier_uris
Required
informational_urls
Required
is_device_only_auth_supported
Required
key_credentials
Required
known_client_applications
Required
logout_url
Required
oauth2_allow_implicit_flow
Required
oauth2_allow_url_path_matching
Required
oauth2_permissions
Required
oauth2_require_post_response
Required
org_restrictions
Required
optional_claims
Required
password_credentials
Required
pre_authorized_applications
Required
public_client
Required
publisher_domain
Required
reply_urls
Required
required_resource_access
Required
saml_metadata_url
Required
sign_in_audience
Required
www_homepage
Required

Variables

Name Description
object_id
str

The object ID.

deletion_timestamp

The time at which the directory object was deleted.

Methods

as_dict

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains 'type' with the msrest type and 'key' with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

deserialize

Parse a str using the RestAPI syntax and return a model.

enable_additional_properties_sending
from_dict

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

is_xml_model
serialize

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

validate

Validate this model recursively and return a list of ValidationError.

as_dict

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains 'type' with the msrest type and 'key' with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Parameters

Name Description
key_transformer
<xref:function>

A key transformer function.

keep_readonly
default value: True

Returns

Type Description

A dict JSON compatible object

deserialize

Parse a str using the RestAPI syntax and return a model.

deserialize(data, content_type=None)

Parameters

Name Description
data
Required
str

A str using RestAPI structure. JSON by default.

content_type
str

JSON by default, set application/xml if XML.

default value: None

Returns

Type Description

An instance of this model

Exceptions

Type Description
DeserializationError if something went wrong

enable_additional_properties_sending

enable_additional_properties_sending()

from_dict

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

from_dict(data, key_extractors=None, content_type=None)

Parameters

Name Description
data
Required

A dict using RestAPI structure

content_type
str

JSON by default, set application/xml if XML.

default value: None
key_extractors
default value: None

Returns

Type Description

An instance of this model

Exceptions

Type Description
DeserializationError if something went wrong

is_xml_model

is_xml_model()

serialize

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

serialize(keep_readonly=False, **kwargs)

Parameters

Name Description
keep_readonly

If you want to serialize the readonly attributes

default value: False

Returns

Type Description

A dict JSON compatible object

validate

Validate this model recursively and return a list of ValidationError.

validate()

Returns

Type Description

A list of validation error