can't create VM from shared gallary in another tenant

James Zhang 0 Reputation points
2025-04-16T17:56:29.77+00:00

Hi,

We have Azure compute galleries in tenant1, and we hared images in this gallery, now we create VM in tenant2 from the image shared in the gallery in tenant1, we got the following error, but it was working before, we are using this guide: https://learn.microsoft.com/en-us/azure/virtual-machines/share-using-app-registration?tabs=cli#code-try-3

(AuthorizationFailed) The client '7afa5fa4-ec90-4f57-ad09-23bbecf8cb0f' with object id '7afa5fa4-ec90-4f57-ad09-23bbecf8cb0f' does not have authorization to perform action 'Microsoft.Compute/galleries/images/versions/read' over scope '/subscriptions/xxxxx-e85313190089/resourceGroups/Stellar/providers/Microsoft.Compute/galleries/xxxx/images/xxxx/versions/1.1.0' or the scope is invalid. If access was recently granted, please refresh your credentials.

Code: AuthorizationFailed

Thanks in advance

Jayden

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,842 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.