Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

IAzureContextContainer Interface

Definition

Namespace:
Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core
Assembly:
Microsoft.Azure.PowerShell.Authentication.Abstractions.dll

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.

public interface IAzureContextContainer : Microsoft.Azure.Commands.Common.Authentication.Abstractions.IExtensibleModel
type IAzureContextContainer = interface
 interface IExtensibleModel
Public Interface IAzureContextContainer
Implements IExtensibleModel
Derived
Implements

Properties

Name Description
Accounts
DefaultContext
Environments
ExtendedProperties (Inherited from IExtensibleModel)
Subscriptions

Methods

Name Description
Clear()

Extension Methods

Name Description
CopyPropertiesFrom(IExtensibleModel, IExtensibleModel)
GetAccount(IAzureContextContainer, String)
GetEnvironment(IAzureContextContainer, String)
GetProperty(IExtensibleModel, String)
GetPropertyAsArray(IExtensibleModel, String)
GetSubscriptionById(IAzureContextContainer, Guid)
GetSubscriptionById(IAzureContextContainer, String)
GetSubscriptionByName(IAzureContextContainer, String)
GetTokenCache(IAzureContextContainer)
HasAccount(IAzureContextContainer, String)
HasEnvironment(IAzureContextContainer, String)
HasSubscriptionId(IAzureContextContainer, Guid)
HasSubscriptionId(IAzureContextContainer, String)
HasSubscriptionName(IAzureContextContainer, String)
HasTokenCache(IAzureContextContainer)
IsPropertySet(IExtensibleModel, String)
PopulateExtensions(IExtensibleModel, PSObject)

Populate the model extensions from a PSObject

SetContextWithCache(IAzureContextContainer, IAzureContext, String)

Set the context for the current profile, preserving token cache information. After MSAL, token cache is no longer stored in contexts. So this method roughly equals to TrySetDefaultContext().

SetOrAppendProperty(IExtensibleModel, String, String[])
SetProperty(IExtensibleModel, String, String[])
SetTokenCache(IAzureContextContainer, IAzureTokenCache)
UpdateProperties(IExtensibleModel, IExtensibleModel)

Applies to