I'm accessing a VM through an application I've created in the Active Directory. This application has full access to all the resources I'm trying to reach.
The problem is that the VM cannot be found. I'm able to access the VM's resource group, but Azure is reporting there are no VMs inside. Any idea why this might be happening?
My code:
ApplicationTokenCredentials credentials = new ApplicationTokenCredentials(client, tenant, key, AzureEnvironment.AZURE);
Azure azure = Azure.configure()
.withLogLevel(LogLevel.NONE)
.authenticate(credentials)
.withSubscription(subscription);
VirtualMachine vm = azure.virtualMachines().getByResourceGroup(resourceGroup, vmName);
vm.start();