diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkPeeringImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkPeeringImpl.java index 81a02379f4eee..95f9d7a563e8a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkPeeringImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkPeeringImpl.java @@ -444,7 +444,7 @@ public Observable getRemoteNetworkAsync() { final NetworkPeeringImpl self = this; if (self.remoteNetwork != null) { return Observable.just(self.remoteNetwork); - } else if (ResourceUtils.subscriptionFromResourceId(this.remoteNetworkId()).equalsIgnoreCase(ResourceUtils.subscriptionFromResourceId(this.id()))) { + } else if (this.isSameSubscription()) { // Fetch the remote network if within the same subscription return this.manager().networks().getByIdAsync(this.remoteNetworkId()) .doOnNext(new Action1() {