Delen via


ESim Class

Definition

A class that represents an embedded SIM (eSIM, or eUICC). An eSIM stores one or more identities (eSIM profiles) belonging to one or more mobile network operators (MNOs). An eSIM is not a form factor; it's a way to manage SIM profiles.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

public ref class ESim sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ESim final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ESim final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ESim
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class ESim
Public NotInheritable Class ESim
Inheritance
Object Platform::Object IInspectable ESim
Attributes

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v6.0)
App capabilities
Microsoft.eSIMManagement_8wekyb3d8bbwe

Remarks

A traditional SIM card stores a single identity that the modem can use to register onto a mobile network operator's (MNO's) network, and provide cellular service (the card is usually distributed by the MNO). But an eSIM stores one or more identities (eSIM profiles) belonging to one or more mobile operators. An eSIM switches identities by enabling and disabling the eSIM profiles saved on the card. Once an eSIM profile is enabled, the eSIM appears and functions as if it were a traditional SIM card from the MNO that distributed the profile. In this way, the end-user can easily switch between MNOs without changing the physical card.

There are several steps in the process of installing a profile onto an eSIM. The end-user provides an activation code, which is a string that contains the uniform resource location (URL) of a profile-distributing server together with some identifying information. Next, the eSIM-capable device uses the data in the activation code to contact the server. The server returns the metadata for a specific profile, together with information that's then presented to the user asking for consent to download the profile. Having received consent, the eSIM-capable device downloads the profile and sends the profile binary blob to the eSIM. Lastly, the profile is ready to be activated when the profile is successfully written to the eSIM. LpaSvc is a service for handling all eSIM-related operation requests. For end-users, there is a Managing eSIM profiles page in Settings to provide a UI for managing the eSIM.

Version history

Windows version SDK version Value added
1903 18362 Discover
1903 18362 Discover(String,String)
1903 18362 DiscoverAsync
1903 18362 DiscoverAsync(String,String)

Properties

AvailableMemoryInBytes

Gets the available memory on the SIM card in whole bytes.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

Eid

Gets the eSIM ID (EID).

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

FirmwareVersion

Gets the eSIM firmware version.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

MobileBroadbandModemDeviceId

Gets the device identifier, or DeviceInformation Id, of the network MobileBroadbandModem device that carries the eSIM.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

Policy

Gets the policy for the eSIM, regarding whether the eSIM should be shown on the Local User Interface (LUI) for eSIM management.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

SlotIndex

Gets the 0-based slot index (slot number) that the eSim corresponds to. ESim.SlotIndex matches the Index property of the corresponding MobileBroadbandSlotInfo object.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

State

Gets the state of the eSIM, which indicates the presence and working status of the eSIM.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

Methods

DeleteProfileAsync(String)

Asynchronously deletes the specified eSIM profile.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

Discover()

Performs an eSIM profile discovery operation using the default SMDS address.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

Discover(String, String)

Performs an eSIM profile discovery operation for the supplied RSP server address and matching ID.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

DiscoverAsync()

Asynchronously performs an eSIM profile discovery operation using the default SMDS address.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

DiscoverAsync(String, String)

Asynchronously performs an eSIM profile discovery operation for the supplied RSP server address and matching ID.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

DownloadProfileMetadataAsync(String)

Asynchronously downloads installation metadata for the eSIM profile that corresponds to the specified activation code.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

GetProfiles()

Gets the set of profiles stored on the eSIM.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

ResetAsync()

Asynchronously resets the eSIM.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

Events

ProfileChanged

Occurs when the collection of eSIM profiles changes, or when a property of one of the profiles in the collection changes.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.eSIMManagement_8wekyb3d8bbwe. For more info, see Custom capabilities.

Applies to