Share via


Received Shares - Activate Tenant Email Registration

Activates the tenant and email combination using the activation code received.
Activates the email registration for current tenant

POST {endpoint}/emails:activate?api-version=2023-02-15-preview

URI Parameters

Name In Required Type Description
endpoint
path True

string

The sharing endpoint of your purview account. Example: https://{accountName}.purview.azure.com/share

api-version
query True

string

The api version to use

Request Header

Name Required Type Description
repeatability-request-id

string

If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs.

Request Body

Name Type Description
properties

TenantEmailRegistrationProperties

Tenant email registration property bag.

Responses

Name Type Description
200 OK

TenantEmailRegistration

Success

Other Status Codes

PurviewShareError

Default error response.

Headers

x-ms-error-code: string

Security

azureAuth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
https://purview.azure.net/.default Purview service scope

Examples

ReceivedShares_ActivateTenantEmailRegistration

Sample request

POST accountName.purview.azure.com/share/emails:activate?api-version=2023-02-15-preview

{
  "properties": {
    "activationCode": "15ee7153fe0df5a3a449a897d6cec836"
  }
}

Sample response

Date: Wed, 13 Sep 2017 18:04:32 GMT
x-ms-correlation-request-id: 25c78f97-0b0a-4fe9-ad39-883a482265cd
repeatability-request-id: b470712a-ffbc-4d9f-ab99-6640db8bbcb8
{
  "properties": {
    "activationCode": "15ee7153fe0df5a3a449a897d6cec836",
    "activationExpiration": "2022-08-16T22:35:17.2093506Z",
    "email": "john.smith@contoso.com",
    "registrationStatus": "Activated",
    "tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd",
    "state": "Succeeded"
  },
  "id": "cb817140-a0cf-464f-8a82-0a9627a026ab",
  "type": "tenantEmailRegistration"
}

Definitions

Name Description
PurviewShareError

The purview share error model.

PurviewShareErrorInfo

The purview share error body model.

State

State of the resource

TenantEmailRegistration

A tenant email registration data transfer object.

TenantEmailRegistrationProperties

Tenant email registration property bag.

TenantEmailRegistrationStatus

Defines the supported types for registration.

PurviewShareError

The purview share error model.

Name Type Description
error

PurviewShareErrorInfo

The purview share error body model.

PurviewShareErrorInfo

The purview share error body model.

Name Type Description
code

string

Code of the error

details

PurviewShareErrorInfo[]

Nested details of the error model

message

string

Message of the error

target

string

Target of the error

State

State of the resource

Value Description
Unknown

The state of the resource is 'Unknown'

Succeeded

The state of the resource is 'Succeeded'

Creating

The state of the resource is 'Creating'

Deleting

The state of the resource is 'Deleting'

Moving

The state of the resource is 'Moving'

Failed

The state of the resource is 'Failed'

TenantEmailRegistration

A tenant email registration data transfer object.

Name Type Description
id

string

The unique id of the resource.

properties

TenantEmailRegistrationProperties

Tenant email registration property bag.

type

string

Type of the resource.

TenantEmailRegistrationProperties

Tenant email registration property bag.

Name Type Description
activationCode

string

Activation code for the registration.

activationExpiration

string (date-time)

Date of the activation expiration. Represented in the standard date-time format as defined by RFC 3339

email

string

The email to register.

registrationStatus

TenantEmailRegistrationStatus

Defines the supported types for registration.

state

State

State of the resource

tenantId

string

The tenant id to register.

TenantEmailRegistrationStatus

Defines the supported types for registration.

Value Description
ActivationPending

The tenant email registration is in pending state

Activated

The tenant email registration is complete and has been activated

ActivationAttemptsExhausted

The tenant email registration has exhausted the max attempts