Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
:param display_name: Group display name
:type display_name: str
:param mail_nickname: Mail nickname
:type mail_nickname: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides`.
:rtype: :class:`ADGroup `
:rtype: :class:`ClientRawResponse`
if raw=true
:raises:
:class:`GraphErrorException`
"""
parameters = models.GroupCreateParameters(display_name=display_name, mail_nickname=mail_nickname)
# Construct URL
url = '/{tenantID}/groups'
path_format_arguments = {
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id: