Skip to content

Releases: Azure/azure-sdk-for-js

@azure/arm-costmanagement_1.0.0-beta.1

23 May 06:57
ae5026c
Compare
Choose a tag to compare
Pre-release

1.0.0-beta.1 (2023-05-09)

The package of @azure/arm-costmanagement is using our next generation design principles. To learn more, please refer to our documentation Quick Start.

@azure/arm-eventgrid_14.2.0-beta.1

19 May 06:12
4511868
Compare
Choose a tag to compare
Pre-release

14.2.0-beta.1 (2023-05-18)

Features

  • Added operation group CaCertificates
  • Added operation group ClientGroups
  • Added operation group Clients
  • Added operation group Namespaces
  • Added operation group NamespaceTopicEventSubscriptions
  • Added operation group NamespaceTopics
  • Added operation group PartnerDestinations
  • Added operation group PermissionBindings
  • Added operation group TopicSpaces
  • Added Interface AzureADPartnerClientAuthentication
  • Added Interface BoolEqualsFilter
  • Added Interface CaCertificate
  • Added Interface CaCertificatesCreateOrUpdateOptionalParams
  • Added Interface CaCertificatesDeleteHeaders
  • Added Interface CaCertificatesDeleteOptionalParams
  • Added Interface CaCertificatesGetOptionalParams
  • Added Interface CaCertificatesListByNamespaceNextOptionalParams
  • Added Interface CaCertificatesListByNamespaceOptionalParams
  • Added Interface CaCertificatesListResult
  • Added Interface ChannelsDeleteHeaders
  • Added Interface Client
  • Added Interface ClientAuthentication
  • Added Interface ClientAuthenticationSettings
  • Added Interface ClientCertificateAuthentication
  • Added Interface ClientCertificateSubjectDistinguishedName
  • Added Interface ClientCertificateThumbprint
  • Added Interface ClientGroup
  • Added Interface ClientGroupsCreateOrUpdateOptionalParams
  • Added Interface ClientGroupsDeleteHeaders
  • Added Interface ClientGroupsDeleteOptionalParams
  • Added Interface ClientGroupsGetOptionalParams
  • Added Interface ClientGroupsListByNamespaceNextOptionalParams
  • Added Interface ClientGroupsListByNamespaceOptionalParams
  • Added Interface ClientGroupsListResult
  • Added Interface ClientsCreateOrUpdateOptionalParams
  • Added Interface ClientsDeleteHeaders
  • Added Interface ClientsDeleteOptionalParams
  • Added Interface ClientsGetOptionalParams
  • Added Interface ClientsListByNamespaceNextOptionalParams
  • Added Interface ClientsListByNamespaceOptionalParams
  • Added Interface ClientsListResult
  • Added Interface DeliveryConfiguration
  • Added Interface DomainEventSubscriptionsDeleteHeaders
  • Added Interface DomainsDeleteHeaders
  • Added Interface DomainTopicEventSubscriptionsDeleteHeaders
  • Added Interface DomainTopicsDeleteHeaders
  • Added Interface DynamicRoutingEnrichment
  • Added Interface ErrorAdditionalInfo
  • Added Interface ErrorDetail
  • Added Interface ErrorResponse
  • Added Interface EventSubscriptionsDeleteHeaders
  • Added Interface ExtendedLocation
  • Added Interface Filter
  • Added Interface FiltersConfiguration
  • Added Interface IsNotNullFilter
  • Added Interface IsNullOrUndefinedFilter
  • Added Interface Namespace
  • Added Interface NamespaceRegenerateKeyRequest
  • Added Interface NamespacesCreateOrUpdateOptionalParams
  • Added Interface NamespacesDeleteHeaders
  • Added Interface NamespacesDeleteOptionalParams
  • Added Interface NamespacesGetOptionalParams
  • Added Interface NamespaceSharedAccessKeys
  • Added Interface NamespaceSku
  • Added Interface NamespacesListByResourceGroupNextOptionalParams
  • Added Interface NamespacesListByResourceGroupOptionalParams
  • Added Interface NamespacesListBySubscriptionNextOptionalParams
  • Added Interface NamespacesListBySubscriptionOptionalParams
  • Added Interface NamespacesListResult
  • Added Interface NamespacesListSharedAccessKeysOptionalParams
  • Added Interface NamespacesRegenerateKeyHeaders
  • Added Interface NamespacesRegenerateKeyOptionalParams
  • Added Interface NamespacesUpdateHeaders
  • Added Interface NamespacesUpdateOptionalParams
  • Added Interface NamespaceTopic
  • Added Interface NamespaceTopicEventSubscriptionsCreateOrUpdateOptionalParams
  • Added Interface NamespaceTopicEventSubscriptionsDeleteHeaders
  • Added Interface NamespaceTopicEventSubscriptionsDeleteOptionalParams
  • Added Interface NamespaceTopicEventSubscriptionsGetOptionalParams
  • Added Interface NamespaceTopicEventSubscriptionsListByNamespaceTopicNextOptionalParams
  • Added Interface NamespaceTopicEventSubscriptionsListByNamespaceTopicOptionalParams
  • Added Interface NamespaceTopicEventSubscriptionsUpdateHeaders
  • Added Interface NamespaceTopicEventSubscriptionsUpdateOptionalParams
  • Added Interface NamespaceTopicsCreateOrUpdateOptionalParams
  • Added Interface NamespaceTopicsDeleteHeaders
  • Added Interface NamespaceTopicsDeleteOptionalParams
  • Added Interface NamespaceTopicsGetOptionalParams
  • Added Interface NamespaceTopicsListByNamespaceNextOptionalParams
  • Added Interface NamespaceTopicsListByNamespaceOptionalParams
  • Added Interface NamespaceTopicsListResult
  • Added Interface NamespaceTopicsListSharedAccessKeysOptionalParams
  • Added Interface NamespaceTopicsRegenerateKeyHeaders
  • Added Interface NamespaceTopicsRegenerateKeyOptionalParams
  • Added Interface NamespaceTopicsUpdateHeaders
  • Added Interface NamespaceTopicsUpdateOptionalParams
  • Added Interface NamespaceTopicUpdateParameters
  • Added Interface NamespaceUpdateParameters
  • Added Interface NumberGreaterThanFilter
  • Added Interface NumberGreaterThanOrEqualsFilter
  • Added Interface NumberInFilter
  • Added Interface NumberInRangeFilter
  • Added Interface NumberLessThanFilter
  • Added Interface NumberLessThanOrEqualsFilter
  • Added Interface NumberNotInFilter
  • Added Interface NumberNotInRangeFilter
  • Added Interface PartnerClientAuthentication
  • Added Interface PartnerConfigurationsDeleteHeaders
  • Added Interface PartnerDestination
  • Added Interface PartnerDestinationInfo
  • Added Interface PartnerDestinationsActivateOptionalParams
  • Added Interface PartnerDestinationsCreateOrUpdateOptionalParams
  • Added Interface PartnerDestinationsDeleteHeaders
  • Added Interface PartnerDestinationsDeleteOptionalParams
  • Added Interface PartnerDestinationsGetOptionalParams
  • Added Interface PartnerDestinationsListByResourceGroupNextOptionalParams
  • Added Interface PartnerDestinationsListByResourceGroupOptionalParams
  • Added Interface PartnerDestinationsListBySubscriptionNextOptionalParams
  • Added Interface PartnerDestinationsListBySubscriptionOptionalParams
  • Added Interface PartnerDestinationsListResult
  • Added Interface PartnerDestinationsUpdateHeaders
  • Added Interface PartnerDestinationsUpdateOptionalParams
  • Added Interface PartnerDestinationUpdateParameters
  • Added Interface PartnerEventSubscriptionDestination
  • Added Interface PartnerNamespacesDeleteHeaders
  • Added Interface PartnerRegistrationsCreateOrUpdateHeaders
  • Added Interface PartnerRegistrationsDeleteHeaders
  • Added Interface PartnerTopicEventSubscriptionsDeleteHeaders
  • Added Interface PartnerTopicsDeleteHeaders
  • Added Interface PartnerUpdateDestinationInfo
  • Added Interface PermissionBinding
  • Added Interface PermissionBindingsCreateOrUpdateOptionalParams
  • Added Interface PermissionBindingsDeleteHeaders
  • Added Interface PermissionBindingsDeleteOptionalParams
  • Added Interface PermissionBindingsGetOptionalParams
  • Added Interface PermissionBindingsListByNamespaceNextOptionalParams
  • Added Interface PermissionBindingsListByNamespaceOptionalParams
  • Added Interface PermissionBindingsListResult
  • Added Interface PrivateEndpointConnectionsDeleteHeaders
  • Added Interface QueueInfo
  • Added Interface ResourceMoveChangeHistory
  • Added Interface ResourceSku
  • Added Interface RoutingEnrichments
  • Added Interface RoutingIdentityInfo
  • Added Interface StaticRoutingEnrichment
  • Added Interface StringBeginsWithFilter
  • Added Interface StringContainsFilter
  • Added Interface StringEndsWithFilter
  • Added Interface StringInFilter
  • Added Interface StringNotBeginsWithFilter
  • Added Interface StringNotContainsFilter
  • Added Interface StringNotEndsWithFilter
  • Added Interface StringNotInFilter
  • Added Interface Subscription
  • Added Interface SubscriptionsListResult
  • Added Interface SubscriptionUpdateParameters
  • Added Interface SystemTopicEventSubscriptionsDeleteHeaders
  • Added Interface SystemTopicsDeleteHeaders
  • Added Interface TopicEventSubscriptionsDeleteHeaders
  • Added Interface TopicsConfiguration
  • Added Interface TopicsDeleteHeaders
  • Added Interface TopicSpace
  • Added Interface TopicSpacesConfiguration
  • Added Interface TopicSpacesCreateOrUpdateOptionalParams
  • Added Interface TopicSpacesDeleteHeaders
  • Added Interface TopicSpacesDeleteOptionalParams
  • Added Interface TopicSpacesGetOptionalParams
  • Added Interface TopicSpacesListByNamespaceNextOptionalParams
  • Added Interface TopicSpacesListByNamespaceOptionalParams
  • Added Interface TopicSpacesListResult
  • Added Interface TopicsRegenerateKeyHeaders
  • Added Interface UpdateTopicSpacesConfigurationInfo
  • Added Interface WebhookPartnerDestinationInfo
  • Added Interface WebhookUpdatePartnerDestinationInfo
  • Added Type Alias AlternativeAuthenticationNameSource
  • Added Type Alias CaCertificateProvisioningState
  • Added Type Alias CaCertificatesCreateOrUpdateResponse
  • Added Type Alias CaCertificatesGetResponse
  • Added Type Alias CaCertificatesListByNamespaceNextResponse
  • Added Type Alias CaCertificatesListByNamespaceResponse
  • Added Type Alias ClientCertificateValidationScheme
  • Added Type Alias ClientGroupProvisioningState
  • Added Type Alias ClientGroupsCreateOrUpdateResponse
  • Added Type Alias ClientGroupsGetResponse
  • Added Type Alias ClientGroupsListByNamespaceNextResponse
  • Added Type Alias ClientGroupsListByNamespaceResponse
  • Added Type Alias ClientProvisioningState
  • Added Type Alias ClientsCreateOrUpdateResponse
  • Added Type Alias ClientsGetResponse
  • Added Type Alias ClientsListByNamespaceNextResponse
  • Added Type Alias ClientsListByNamespaceResponse
  • Added Type Alias ClientState
  • Added Type Alias DeliveryMode
  • Added Type Alias DeliverySchema
  • Added Type Alias EventInputSchema
  • Added Type Alias FilterOperatorType
  • Added Type Alias FilterUnion
    ...
Read more

@azure/arm-containerservice_19.0.0-beta.1

19 May 04:30
cf0a0f8
Compare
Choose a tag to compare

19.0.0-beta.1 (2023-05-16)

Features

  • Added operation group ManagedClusterSnapshots
  • Added operation group TrustedAccessRoleBindings
  • Added operation group TrustedAccessRoles
  • Added Interface AbsoluteMonthlySchedule
  • Added Interface AgentPoolNetworkProfile
  • Added Interface AgentPoolWindowsProfile
  • Added Interface ClusterUpgradeSettings
  • Added Interface ContainerServiceNetworkProfileKubeProxyConfig
  • Added Interface ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig
  • Added Interface DailySchedule
  • Added Interface DateSpan
  • Added Interface GuardrailsProfile
  • Added Interface IPTag
  • Added Interface IstioComponents
  • Added Interface IstioIngressGateway
  • Added Interface IstioServiceMesh
  • Added Interface MaintenanceWindow
  • Added Interface ManagedClusterIngressProfile
  • Added Interface ManagedClusterIngressProfileWebAppRouting
  • Added Interface ManagedClusterNodeResourceGroupProfile
  • Added Interface ManagedClusterPropertiesForSnapshot
  • Added Interface ManagedClusterSecurityProfileNodeRestriction
  • Added Interface ManagedClusterSnapshot
  • Added Interface ManagedClusterSnapshotListResult
  • Added Interface ManagedClusterSnapshotsCreateOrUpdateOptionalParams
  • Added Interface ManagedClusterSnapshotsDeleteOptionalParams
  • Added Interface ManagedClusterSnapshotsGetOptionalParams
  • Added Interface ManagedClusterSnapshotsListByResourceGroupNextOptionalParams
  • Added Interface ManagedClusterSnapshotsListByResourceGroupOptionalParams
  • Added Interface ManagedClusterSnapshotsListNextOptionalParams
  • Added Interface ManagedClusterSnapshotsListOptionalParams
  • Added Interface ManagedClusterSnapshotsUpdateTagsOptionalParams
  • Added Interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler
  • Added Interface NetworkProfileForSnapshot
  • Added Interface PortRange
  • Added Interface RelativeMonthlySchedule
  • Added Interface Schedule
  • Added Interface ServiceMeshProfile
  • Added Interface TrustedAccessRole
  • Added Interface TrustedAccessRoleBinding
  • Added Interface TrustedAccessRoleBindingListResult
  • Added Interface TrustedAccessRoleBindingsCreateOrUpdateOptionalParams
  • Added Interface TrustedAccessRoleBindingsDeleteOptionalParams
  • Added Interface TrustedAccessRoleBindingsGetOptionalParams
  • Added Interface TrustedAccessRoleBindingsListNextOptionalParams
  • Added Interface TrustedAccessRoleBindingsListOptionalParams
  • Added Interface TrustedAccessRoleListResult
  • Added Interface TrustedAccessRoleRule
  • Added Interface TrustedAccessRolesListNextOptionalParams
  • Added Interface TrustedAccessRolesListOptionalParams
  • Added Interface UpgradeOverrideSettings
  • Added Interface WeeklySchedule
  • Added Type Alias BackendPoolType
  • Added Type Alias ControlledValues
  • Added Type Alias ControlPlaneUpgradeOverride
  • Added Type Alias IpvsScheduler
  • Added Type Alias IstioIngressGatewayMode
  • Added Type Alias Level
  • Added Type Alias ManagedClusterSnapshotsCreateOrUpdateResponse
  • Added Type Alias ManagedClusterSnapshotsGetResponse
  • Added Type Alias ManagedClusterSnapshotsListByResourceGroupNextResponse
  • Added Type Alias ManagedClusterSnapshotsListByResourceGroupResponse
  • Added Type Alias ManagedClusterSnapshotsListNextResponse
  • Added Type Alias ManagedClusterSnapshotsListResponse
  • Added Type Alias ManagedClusterSnapshotsUpdateTagsResponse
  • Added Type Alias Mode
  • Added Type Alias NodeOSUpgradeChannel
  • Added Type Alias Protocol
  • Added Type Alias RestrictionLevel
  • Added Type Alias ServiceMeshMode
  • Added Type Alias TrustedAccessRoleBindingProvisioningState
  • Added Type Alias TrustedAccessRoleBindingsCreateOrUpdateResponse
  • Added Type Alias TrustedAccessRoleBindingsGetResponse
  • Added Type Alias TrustedAccessRoleBindingsListNextResponse
  • Added Type Alias TrustedAccessRoleBindingsListResponse
  • Added Type Alias TrustedAccessRolesListNextResponse
  • Added Type Alias TrustedAccessRolesListResponse
  • Added Type Alias Type
  • Added Type Alias UpdateMode
  • Interface AgentPool has a new optional parameter capacityReservationGroupID
  • Interface AgentPool has a new optional parameter enableCustomCATrust
  • Interface AgentPool has a new optional parameter messageOfTheDay
  • Interface AgentPool has a new optional parameter networkProfile
  • Interface AgentPool has a new optional parameter windowsProfile
  • Interface AgentPoolsDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget
  • Interface ContainerServiceNetworkProfile has a new optional parameter kubeProxyConfig
  • Interface MaintenanceConfiguration has a new optional parameter maintenanceWindow
  • Interface ManagedCluster has a new optional parameter creationData
  • Interface ManagedCluster has a new optional parameter enableNamespaceResources
  • Interface ManagedCluster has a new optional parameter guardrailsProfile
  • Interface ManagedCluster has a new optional parameter ingressProfile
  • Interface ManagedCluster has a new optional parameter nodeResourceGroupProfile
  • Interface ManagedCluster has a new optional parameter serviceMeshProfile
  • Interface ManagedCluster has a new optional parameter upgradeSettings
  • Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter capacityReservationGroupID
  • Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter enableCustomCATrust
  • Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter messageOfTheDay
  • Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter networkProfile
  • Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter windowsProfile
  • Interface ManagedClusterAPIServerAccessProfile has a new optional parameter enableVnetIntegration
  • Interface ManagedClusterAPIServerAccessProfile has a new optional parameter subnetId
  • Interface ManagedClusterAutoUpgradeProfile has a new optional parameter nodeOSUpgradeChannel
  • Interface ManagedClusterHttpProxyConfig has a new optional parameter effectiveNoProxy
  • Interface ManagedClusterLoadBalancerProfile has a new optional parameter backendPoolType
  • Interface ManagedClustersDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget
  • Interface ManagedClusterSecurityProfile has a new optional parameter customCATrustCertificates
  • Interface ManagedClusterSecurityProfile has a new optional parameter nodeRestriction
  • Interface ManagedClusterStorageProfileDiskCSIDriver has a new optional parameter version
  • Interface ManagedClusterWorkloadAutoScalerProfile has a new optional parameter verticalPodAutoscaler
  • Added Enum KnownBackendPoolType
  • Added Enum KnownControlledValues
  • Added Enum KnownControlPlaneUpgradeOverride
  • Added Enum KnownIpvsScheduler
  • Added Enum KnownIstioIngressGatewayMode
  • Added Enum KnownLevel
  • Added Enum KnownMode
  • Added Enum KnownNodeOSUpgradeChannel
  • Added Enum KnownProtocol
  • Added Enum KnownRestrictionLevel
  • Added Enum KnownServiceMeshMode
  • Added Enum KnownTrustedAccessRoleBindingProvisioningState
  • Added Enum KnownType
  • Added Enum KnownUpdateMode
  • Enum KnownOssku has a new value AzureLinux
  • Enum KnownOssku has a new value Mariner
  • Enum KnownPublicNetworkAccess has a new value SecuredByPerimeter
  • Enum KnownSnapshotType has a new value ManagedCluster
  • Enum KnownWorkloadRuntime has a new value KataMshvVmIsolation

Breaking Changes

  • Interface ContainerServiceNetworkProfile no longer has parameter dockerBridgeCidr

@azure/eventgrid_4.12.0

17 May 18:21
6886589
Compare
Choose a tag to compare
[@azure/eventgrid] Update EG Minor Version (#25897)

### Packages impacted by this PR
@azure/eventgrid

### Issues associated with this PR
None

### Describe the problem that is addressed by this PR
Now new features/bug fixes are added to this PR. The previous release
4.11.1 added new system events to the SDK. Normally, we update the minor
version and not the patch version for such releases. But, since only the
patch version has been updated for that release, in order to maintain
consistency, on the release guidelines, I am updating the minor version
and releasing a new version of the SDK through this PR.

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
No special design consideration.

### Are there test cases added in this PR? _(If not, why?)_
Very trivial update of Minor Version. No test cases are required.

### Provide a list of related PRs _(if any)_
None

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
None

### Checklists
- [X] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [X] Added a changelog (if necessary)

@xirzec Please review and approve. Thanks

@azure/communication-rooms_1.0.0-beta.2

17 May 21:58
399c89d
Compare
Choose a tag to compare
Pre-release
Add release date for Rooms Public Preview Release JS (#25821)

### Packages impacted by this PR


### Issues associated with this PR


### Describe the problem that is addressed by this PR


### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?


### Are there test cases added in this PR? _(If not, why?)_


### Provide a list of related PRs _(if any)_


### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)

Co-authored-by: Minnie Liu <[email protected]>

@azure/communication-phone-numbers_1.3.0-alpha.20230517.1

17 May 12:40
e81c575
Compare
Choose a tag to compare
Jiriburant/2023 05 17 release (#25901)

### Packages impacted by this PR


### Issues associated with this PR


### Describe the problem that is addressed by this PR


### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?


### Are there test cases added in this PR? _(If not, why?)_


### Provide a list of related PRs _(if any)_


### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)

@azure/template_1.0.12-beta.2782095

17 May 20:12
Compare
Choose a tag to compare
Pre-release

1.0.12-beta.2782095 (2023-05-17)

  • Test Release Pipeline

@azure/identity_3.2.2

15 May 20:45
40f2977
Compare
Choose a tag to compare
[Identity] Remove console logging for processMultitenantRequest (#25875)

@azure/container-registry_1.1.0

12 May 03:49
5c861b2
Compare
Choose a tag to compare
[ACR] Update SDK_VERSION constant (#25842)

### Packages impacted by this PR

- `@azure/container-registry`

### Describe the problem that is addressed by this PR

The release automation wasn't updating `constants.ts`. This value isn't
exposed in our API but is passed to our telemetry.

@azure/identity_3.2.1

11 May 19:24
b69246d
Compare
Choose a tag to compare
Add auxiliary authentication header policy in core pipeline (#25270)

### Background

Add a policy for external tokens to `x-ms-authorization-auxiliary`
header in core lib. This header will be used when creating a
cross-tenant application we may need to handle authentication requests
for resources that are in different tenants. You can learn [more
here](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant).
Here I collect two use cases:

- Create a virtual network peering between virtual networks across
tenants ([see
here](https://learn.microsoft.com/en-us/azure/virtual-network/create-peering-different-subscriptions?tabs=create-peering-portal#cli))
- Share images across tenants ([see
here](https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/share-images-across-tenants))

### Usecase - create a virtual network peering across tenants

We have two subscriptions cross two tenants:
```
subscriptionA = "75d6dc7b-9a8d-4f94-81ce-8a9437f3ce2c" in tenantA
subscriptionB = "92f95d8f-3c67-4124-91c7-8cf07cdbf241" in tenantB 
```
Prepare the app register and grant permission in both subscriptions,
please note we'll have one app register with two service principals in
two tenants.

```
# Create app registration named `appRegisterB` which allows to be used in any orgnaizational directory located in `tenantB`

# Create a service principal for `appRegisterB` in `tenantA` by login url: [https://login.microsoftonline.com/{tenant-id}/adminconsent?client_id={client-id}](https://login.microsoftonline.com/%7Btenant-id%7D/adminconsent?client_id=%7Bclient-id%7D)

# Add roles for `appRegisterB` in both `subscriptionA` and `subscriptionB`
```
Prepare the virtual network in both subscriptions:

```
# Switch to subscription A
az account set -s $subscriptionA 

# Create resource group A
az group create --name myResourceGroupA --location eastus

# Create virtual network A
az network vnet create --name myVnetA --resource-group myResourceGroupA --location eastus --address-prefix 10.0.0.0/16

# Switch to subscription B
az account set -s $subscriptionB 

# Create resource group B
az group create --name myResourceGroupB --location eastus

# Create virtual network B
az network vnet create --name myVnetB --resource-group myResourceGroupB --location eastus --address-prefix 10.1.0.0/16
```

Create a virtual network peering between these two virtual networks. We
could build this peer relationship from myVnetA to myVnetB, or from
myVnetB to myVnetA.

If we build a client under subscriptionB then we could create this peer
from myVnetB to myVnetA with below headers:

| Header name | Description | Example value |
| ----------- | ----------- | ------------ |
| Authorization | Primary token, token got from credentialB | Bearer
&lt;primary-token&gt; |
| x-ms-authorization-auxiliary | Auxiliary tokens, token got from
credentialA | Bearer &lt;auxiliary-token1&gt; |

```typescript
  const tenantA = "c029c2bd-5f77-48fd-b9b8-6dbc7c475125";
  const tenantB = "72f988bf-86f1-41af-91ab-2d7cd011db47";
  const subscriptionB = "92f95d8f-3c67-4124-91c7-8cf07cdbf241";
  const myResourceGroupB = "myResourceGroupB";
  const myVnetB = "myVnetB";
  const virtualNetworkPeeringName = "myVnetA";
  const virtualNetworkPeeringParameters: VirtualNetworkPeering = {
    allowForwardedTraffic: false,
    allowGatewayTransit: false,
    allowVirtualNetworkAccess: true,
    remoteVirtualNetwork: {
      id:
        "/subscriptions/75d6dc7b-9a8d-4f94-81ce-8a9437f3ce2c/resourceGroups/myResourceGroupA/providers/Microsoft.Network/virtualNetworks/myVnetA"
    },
    useRemoteGateways: false
  };
```
### [Preferred] Option 1: Provide an extra policy
`auxiliaryAuthenticationHeaderPolicy`

Provide a new policy `auxiliaryAuthenticationHeaderPolicy` in core, then
customer code could leverage that policy to add auxilary header.

```typescript
async function createPeeringWithPolicy() {
  const credentialA = new DefaultAzureCredential({tenantId: tenantA});
  const credentialB = new DefaultAzureCredential({tenantId: tenantB});
  const client = new NetworkManagementClient(credentialB, subscriptionB,
    {
      // Add the extra policy when building client
      additionalPolicies: [{
        policy: auxiliaryAuthenticationHeaderPolicy({
          credentials: [credentialA],
          scopes: "https://management.core.windows.net//.default"
        }),
        position: "perRetry",
      }]
    });
  const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait(
    myResourceGroupB,
    myVnetB,
    virtualNetworkPeeringName,
    virtualNetworkPeeringParameters,  
  );
  console.log(result);
}
```

### Option 2: Add `auxiliaryTenants` as a client option

Similar the implementation in
[Go](https://github.com/Azure/azure-sdk-for-go/pull/19309), we could
provide an option in `CommonClientOptions`.
```typescript
/**
 * Auxiliary tenant ids which will be used to get token from
 */
auxiliaryTenants?: string[];
```

And then enhance the current bearerTokenAuthenticationPolicy logic to
detect if we have the `auxiliaryTenants` provided, if yes we could
automatically get tokens and add `x-ms-authorization-auxiliary` header
in request. And the customer code would be like:
```typescript
async function createPeeringWithParam() {  
  const credential = new ClientSecretCredential(tenantB, env.clientB, env.secretB, {
    // We would also add allowed tenant list into current credential so that we could get relevant tenant tokens
    additionallyAllowedTenants: [tenantA]
  });
  const client = new NetworkManagementClient(credential, subscriptionB, {
      // If the parameter is provided the bearer policy would append the extra header
      auxiliaryTenants: [tenantA]
    });
  const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait(
    myResourceGroupB,
    myVnetB,
    virtualNetworkPeeringName,
    virtualNetworkPeeringParameters
  );
  console.log(result);
}
```

### Option 3: Add `auxiliaryCredentials` option in
BearerTokenAuthenticationPolicyOptions

Instead of providing new policy we could add a new option in
`BearerTokenAuthenticationPolicyOptions` in original
bearerTokenAuthenticationPolicy. Then in that policy we could detect if
the parameter `auxiliaryCredentials` is provided, if yes append the
header accordingly.

```typescript
/**
 * Provide the auxiliary credentials to get tokens in header x-ms-authorization-auxiliary
 */
auxiliaryCredentials: TokenCredential[];
```

But it would be more complex from customer side, because we add bearer
policy by default so we have to remove that one first and then re-add a
new one.

```typescript
async function createPeeringWithNewBearerPolicy() {
  const credentialA = new ClientSecretCredential(tenantA, clientB, secretB);
  const credentialB = new ClientSecretCredential(tenantB, clientB, secretB);
  const client = new NetworkManagementClient(credentialB, subscriptionB);
  // Build a new policy with auxiliaryCredentials provide
  const customizedBearerPolicy = bearerTokenAuthenticationPolicy({
    credential: credentialB,
    scopes: "https://management.core.windows.net//.default",
    auxiliaryCredentials: [credentialA]
  });
  // Remove the original one
  client.pipeline.removePolicy({
    name: bearerTokenAuthenticationPolicyName
  });
  // Add our new policy
  client.pipeline.addPolicy(customizedBearerPolicy);
  const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait(
    myResourceGroupB,
    myVnetB,
    virtualNetworkPeeringName,
    virtualNetworkPeeringParameters
  );
  console.log(result);
}
```

Simply speaking I prefer the option 1, you could know more
[here](https://github.com/Azure/azure-sdk-for-js/pull/25270#issuecomment-1510855660).

### Reference
Java: https://github.com/Azure/azure-sdk-for-java/pull/14336
Python: https://github.com/Azure/azure-sdk-for-python/pull/24585/
Go: https://github.com/Azure/azure-sdk-for-go/pull/19309
.Net: https://github.com/Azure/azure-sdk-for-net/pull/35097 // Only add
sample, didn't implement in core

---------

Co-authored-by: Jeff Fisher <[email protected]>