Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
:param member_id: The object ID of the contact, group, user, or
service principal to check for membership in the specified group.
:type member_id: 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:`CheckGroupMembershipResult
`
:rtype: :class:`ClientRawResponse`
if raw=true
:raises:
:class:`GraphErrorException`
"""
parameters = models.CheckGroupMembershipParameters(group_id=group_id, member_id=member_id)
# Construct URL
url = '/{tenantID}/isMemberOf'
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: