ReceivedSharesClient.ActivateTenantEmailRegistration Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
[Protocol Method] Activates the tenant and email combination using the activation code received.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.Response ActivateTenantEmailRegistration (Azure.Core.RequestContent content, string repeatabilityRequestId = default, Azure.RequestContext context = default);
abstract member ActivateTenantEmailRegistration : Azure.Core.RequestContent * string * Azure.RequestContext -> Azure.Response
override this.ActivateTenantEmailRegistration : Azure.Core.RequestContent * string * Azure.RequestContext -> Azure.Response
Public Overridable Function ActivateTenantEmailRegistration (content As RequestContent, Optional repeatabilityRequestId As String = Nothing, Optional context As RequestContext = Nothing) As Response
Parameters
- content
- RequestContent
The content to send as the body of the request.
- repeatabilityRequestId
- 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.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
content
is null.
Service returned a non-success status code.
Examples
This sample shows how to call ActivateTenantEmailRegistration with required parameters and parse the result.
var credential = new DefaultAzureCredential();
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ReceivedSharesClient(endpoint, credential);
var data = new {};
Response response = client.ActivateTenantEmailRegistration(RequestContent.Create(data));
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
This sample shows how to call ActivateTenantEmailRegistration with all parameters and request content, and how to parse the result.
var credential = new DefaultAzureCredential();
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ReceivedSharesClient(endpoint, credential);
var data = new {
properties = new {
activationCode = "<activationCode>",
},
};
Response response = client.ActivateTenantEmailRegistration(RequestContent.Create(data), "<repeatabilityRequestId>");
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("properties").GetProperty("activationCode").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("activationExpiration").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("email").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("registrationStatus").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("state").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("tenantId").ToString());
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("type").ToString());
Remarks
Activates the email registration for current tenant
Below is the JSON schema for the request and response payloads.
Request Body:
Schema for TenantEmailRegistration
:
{
properties: {
activationCode: string, # Required. Activation code for the registration.
activationExpiration: string (ISO 8601 Format), # Optional. Date of the activation expiration. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
email: string, # Optional. The email to register.
registrationStatus: "ActivationPending" | "Activated" | "ActivationAttemptsExhausted", # Optional. Defines the supported types for registration.
state: "Unknown" | "Succeeded" | "Creating" | "Deleting" | "Moving" | "Failed", # Optional. State of the resource
tenantId: string, # Optional. The tenant id to register.
}, # Optional. Tenant email registration property bag.
id: string, # Optional. The unique id of the resource.
type: string, # Optional. Type of the resource.
}
Response Body:
Schema for TenantEmailRegistration
:
{
properties: {
activationCode: string, # Required. Activation code for the registration.
activationExpiration: string (ISO 8601 Format), # Optional. Date of the activation expiration. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
email: string, # Optional. The email to register.
registrationStatus: "ActivationPending" | "Activated" | "ActivationAttemptsExhausted", # Optional. Defines the supported types for registration.
state: "Unknown" | "Succeeded" | "Creating" | "Deleting" | "Moving" | "Failed", # Optional. State of the resource
tenantId: string, # Optional. The tenant id to register.
}, # Optional. Tenant email registration property bag.
id: string, # Optional. The unique id of the resource.
type: string, # Optional. Type of the resource.
}
Applies to
Azure SDK for .NET