It depends on what actions you are trying to perform. Some will only require Read while others will require write access. It will most definitely need access to the resource group that the VM or any other service is residing in.
Attempts authentication using a managed identity that has been assigned to the deployment environment. This authentication type works for all Azure hosted environments that support managed identity. More information about configuring managed identities can be found here: https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview
More information:
ManagedIdentityCredential Class