# Account Mapping ## Get mapping `zero_trust.dlp.email.account_mapping.get(AccountMappingGetParams**kwargs) -> AccountMappingGetResponse` **get** `/accounts/{account_id}/dlp/email/account_mapping` Retrieves the email provider mapping configuration for DLP email scanning. ### Parameters - `account_id: str` ### Returns - `class AccountMappingGetResponse: …` - `addin_identifier_token: str` - `auth_requirements: AuthRequirements` - `class AuthRequirementsUnionMember0: …` - `allowed_microsoft_organizations: List[str]` - `type: Literal["Org"]` - `"Org"` - `class AuthRequirementsType: …` - `type: Literal["NoAuth"]` - `"NoAuth"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) account_mapping = client.zero_trust.dlp.email.account_mapping.get( account_id="account_id", ) print(account_mapping.addin_identifier_token) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "addin_identifier_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "auth_requirements": { "allowed_microsoft_organizations": [ "string" ], "type": "Org" } } } ``` ## Create mapping `zero_trust.dlp.email.account_mapping.create(AccountMappingCreateParams**kwargs) -> AccountMappingCreateResponse` **post** `/accounts/{account_id}/dlp/email/account_mapping` Creates a mapping between a Cloudflare account and an email provider for DLP email scanning integration. ### Parameters - `account_id: str` - `auth_requirements: AuthRequirements` - `class AuthRequirementsUnionMember0: …` - `allowed_microsoft_organizations: SequenceNotStr[str]` - `type: Literal["Org"]` - `"Org"` - `class AuthRequirementsType: …` - `type: Literal["NoAuth"]` - `"NoAuth"` ### Returns - `class AccountMappingCreateResponse: …` - `addin_identifier_token: str` - `auth_requirements: AuthRequirements` - `class AuthRequirementsUnionMember0: …` - `allowed_microsoft_organizations: List[str]` - `type: Literal["Org"]` - `"Org"` - `class AuthRequirementsType: …` - `type: Literal["NoAuth"]` - `"NoAuth"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) account_mapping = client.zero_trust.dlp.email.account_mapping.create( account_id="account_id", auth_requirements={ "allowed_microsoft_organizations": ["string"], "type": "Org", }, ) print(account_mapping.addin_identifier_token) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "addin_identifier_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "auth_requirements": { "allowed_microsoft_organizations": [ "string" ], "type": "Org" } } } ``` ## Domain Types ### Account Mapping Get Response - `class AccountMappingGetResponse: …` - `addin_identifier_token: str` - `auth_requirements: AuthRequirements` - `class AuthRequirementsUnionMember0: …` - `allowed_microsoft_organizations: List[str]` - `type: Literal["Org"]` - `"Org"` - `class AuthRequirementsType: …` - `type: Literal["NoAuth"]` - `"NoAuth"` ### Account Mapping Create Response - `class AccountMappingCreateResponse: …` - `addin_identifier_token: str` - `auth_requirements: AuthRequirements` - `class AuthRequirementsUnionMember0: …` - `allowed_microsoft_organizations: List[str]` - `type: Literal["Org"]` - `"Org"` - `class AuthRequirementsType: …` - `type: Literal["NoAuth"]` - `"NoAuth"`