Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.61k stars 2.83k forks source link

Workspace.get() throws an exception if "auth" not specified for certain workspaces #23736

Closed rfernand2 closed 7 months ago

rfernand2 commented 2 years ago

Describe the bug Trying to create a workspace object for an existing Singularity workspace with specifying the "auth" parameter throws the following exception:

UserErrorException:
    Message: You are currently logged-in to 72f988bf-86f1-41af-91ab-2d7cd011db47 tenant. You don't have access to d4404794-ab5b-48de-b7c7-ec1fefb0a04e subscription, please check if it is in this tenant. All the subscriptions that you have access to in this tenant are = 
 [SubscriptionInfo(subscription_name='Cosmos_C&E_Azure_AzureEngineeringSystems_100200', subscription_id='8c4b5b03-3b24-4ed0-91f5-a703cd91b412'), SubscriptionInfo(subscription_name='ES-ESP-AS-vPack-Prod', subscription_id='83a9a25f-d922-437f-bc5b-79f3b6827513'), SubscriptionInfo(subscription_name='IDEAs MS Reporting', subscription_id='bac420ed-c6fc-4a05-8ac1-8c0c52da1d6e'), SubscriptionInfo(subscription_name='Code generate Test and Infra', subscription_id='7fd08dcc-a653-4b0f-8f8c-4dac889fdda4'), SubscriptionInfo(subscription_name='Kensho', subscription_id='f92fab0a-38b9-44ed-b800-2ed55fa1b9d9'), SubscriptionInfo(subscription_name='Speech_Project_MaaT_dev', subscription_id='cb64632e-7082-4fb9-aa48-841e2aee2eb4'), SubscriptionInfo(subscription_name='MSAI Search Research', subscription_id='c3547baf-332f-4d8f-96bd-0659b39c7a59'), SubscriptionInfo(subscription_name='msteams.nonprod.pub.msft.msts', subscription_id='407ff5d7-0113-4c5c-8534-f5cfb09298f5'), SubscriptionInfo(subscription_name='Saidi Dev and Test Subscription', subscription_id='588845a8-a4a7-4ab1-83a1-1388452e8c0c'), SubscriptionInfo(subscription_name='rfernand-ML_research_and_tools', subscription_id='41c6e824-0f66-4076-81dd-f751c70a140b'), SubscriptionInfo(subscription_name='Azure ML Team Testing', subscription_id='4aaa645c-5ae2-4ae9-a17a-84b9023bc56a'), SubscriptionInfo(subscription_name='RL & Robotics', subscription_id='c8b7f913-60fb-4759-a310-fc5630e56f99'), SubscriptionInfo(subscription_name='RL Core', subscription_id='90ee78ea-6ff0-40bd-b7f9-a106218f8510'), SubscriptionInfo(subscription_name='GCRProdEx2', subscription_id='46da6261-2167-4e71-8b0d-f4a45215ce61'), SubscriptionInfo(subscription_name='DLTS - Training', subscription_id='20d3c9e4-625d-45e1-ac8a-def90d3c4a88'), SubscriptionInfo(subscription_name='AI Platform – GCR 1', subscription_id='d4c59fc3-1b01-4872-8981-3ee8cbd79d68'), SubscriptionInfo(subscription_name='GCRProdEx1', subscription_id='7ccdb8ae-4daf-4f0f-8019-e80665eb00d2'), SubscriptionInfo(subscription_name='Singularity Shared', subscription_id='22da88f6-1210-4de2-a5a3-da4c7c2a1213'), SubscriptionInfo(subscription_name='AI Platform GPU 37 - MSR', subscription_id='db9fc1d1-b44e-45a8-902d-8c766c255568'), SubscriptionInfo(subscription_name='AnE.ExP.Production', subscription_id='dad45786-32e5-4ef3-b90e-8e0838fbadb6'), SubscriptionInfo(subscription_name='Edge ExpInsights', subscription_id='f30787b9-82a8-4e74-bb0f-f12d64ecc496'), SubscriptionInfo(subscription_name='Epic-Edge-ES-MergeResolver', subscription_id='482e1993-01d4-4b16-bff4-1866929176a1'), SubscriptionInfo(subscription_name='Epic-Edge-ES-SrcPub-Prod', subscription_id='26596251-f2f3-4e31-8a1b-f0754e32ad73'), SubscriptionInfo(subscription_name='ES-ESP-AS-vPack-Nonprod', subscription_id='4115b323-4aac-47f4-bb13-22af265ed58b'), SubscriptionInfo(subscription_name='TScience', subscription_id='9ec1d932-0f3f-486c-acc6-e7d78b358f9b'), SubscriptionInfo(subscription_name='Purview_Demo_PartnerSandbox', subscription_id='8c2c7b23-848d-40fe-b817-690d79ad9dfd'), SubscriptionInfo(subscription_name='MSFT-Modern Device-Modern Mgmt-Imaging00', subscription_id='29de2cfc-f00a-43bb-bdc8-3108795bd282'), SubscriptionInfo(subscription_name='CLOUDBUILD-ANYBUILD-POC-01', subscription_id='7afc2d66-d5b4-4e84-970b-a782e3e4cc46'), SubscriptionInfo(subscription_name='ER: CE Security Service Operation Center', subscription_id='7d411d23-59e5-4e2e-8566-4f59de4544f2'), SubscriptionInfo(subscription_name='AnyBuild-InternalProdClusters', subscription_id='0368444d-756e-4ca6-9ecd-e964248c227a'), SubscriptionInfo(subscription_name='PPP_ACBB_ATS_AKS_NonProd', subscription_id='cb9eb375-570a-4e75-b83a-77dd942bee9f'), SubscriptionInfo(subscription_name='Weather and Finance INT', subscription_id='009d0e9f-a42a-470e-b315-82496a88cf0f'), SubscriptionInfo(subscription_name='Applied Sciences Group Dev', subscription_id='e686ef8c-d35d-4e9b-92f8-caaaa7948c0a'), SubscriptionInfo(subscription_name='PhillyExt', subscription_id='a20c82c7-4497-4d44-952a-3105f790e26b'), SubscriptionInfo(subscription_name='MSRLabs Azure ML Pilot', subscription_id='710e04b9-9155-4f01-aa8e-52848f055ad2'), SubscriptionInfo(subscription_name='1IS - One Integration Service - NonProduction', subscription_id='0cd6095b-b140-41ec-ad1d-32f2f7493386'), SubscriptionInfo(subscription_name='TScienceGPU', subscription_id='79f57c16-00fe-48da-87d4-5192e86cd047'), SubscriptionInfo(subscription_name='Babel', subscription_id='a1920ebd-59b7-4f19-af9f-5e80599e88e4'), SubscriptionInfo(subscription_name='AnE.ExP.Development', subscription_id='80d2c6c6-fa64-4ab1-8aa5-4e118c6b16ce'), SubscriptionInfo(subscription_name='Skype-NetEM-STAGING', subscription_id='8cff5d56-95fb-4a74-ab9d-079edb45313e'), SubscriptionInfo(subscription_name='ServicesPortfolio MCS', subscription_id='eec2de82-6ab2-4a84-ae5f-57e9a10bf661'), SubscriptionInfo(subscription_name='Edge DevTools Client', subscription_id='d21a0e9f-5e29-4b39-8ba5-0e189bc5fe2d'), SubscriptionInfo(subscription_name='Service Profiler Development', subscription_id='bbe41737-1ade-44df-8e33-217f11b8b452'), SubscriptionInfo(subscription_name='Project Vienna Build', subscription_id='ad203158-bc5d-4e72-b764-2607833a71dc'), SubscriptionInfo(subscription_name='LinuxMdsd Test', subscription_id='13723929-6644-4060-a50a-cc38ebc5e8b1'), SubscriptionInfo(subscription_name='AISC-EngSys-01', subscription_id='eef8b6d5-94da-4b36-9327-a662f2674efb'), SubscriptionInfo(subscription_name='Python_AI_Tools_PM_Team_Sub', subscription_id='1163fbbe-27e7-4b0f-8466-195fe5417043'), SubscriptionInfo(subscription_name='Bing MM Measurement', subscription_id='ae71ef11-a03f-4b4f-a0e6-ef144727c711'), SubscriptionInfo(subscription_name='SPO-CyrusB', subscription_id='8ae1955e-f748-4273-a507-10159ba940f9'), SubscriptionInfo(subscription_name='AISC-DEV-02', subscription_id='b2a328a7-ffff-4c09-b643-a4758cf170bc'), SubscriptionInfo(subscription_name='Pytorch Build', subscription_id='3905431d-c062-4c17-8fd9-c51f89f334c4'), SubscriptionInfo(subscription_name='Traffic manager PPE', subscription_id='56207a5d-4746-4a2d-9f7f-c5ac77a5ddfd'), SubscriptionInfo(subscription_name='Maps Mining Azure', subscription_id='ca38bc19-cf50-48e2-bbe6-8c35b40212d8'), SubscriptionInfo(subscription_name='Terraform Testing on Azure with TTL = 2 Days', subscription_id='85b3dbca-5974-4067-9669-67a141095a76'), SubscriptionInfo(subscription_name='MSR AI Engineering General Purpose', subscription_id='6ad709f4-8451-47eb-b4aa-24733abf60e4'), SubscriptionInfo(subscription_name='Cosmos_AIR_MSR AI_Research (Shared)_100017', subscription_id='7ad724aa-2f5b-49a1-a1b5-3f7d6ebe9a6e'), SubscriptionInfo(subscription_name='Grand Central Resources Production 2', subscription_id='40641f8d-33f8-4948-b0ae-3df7e85e94e9'), SubscriptionInfo(subscription_name='STCA-Segment Intelligence', subscription_id='59575035-46ba-4b83-8025-0cb076c7c097'), SubscriptionInfo(subscription_name='ADF Test sub - App Model V2', subscription_id='0ee78edb-a0ad-456c-a0a2-901bf542c102'), SubscriptionInfo(subscription_name='Azure Portal Telemetry Reporting', subscription_id='4bbecc02-f2c3-402a-8e01-1dfb1ffef499'), SubscriptionInfo(subscription_name='Falcon Dev Cluster', subscription_id='cd0fa82d-b6b6-4361-b002-050c32f71353'), SubscriptionInfo(subscription_name='Core-ES-WorkManagement', subscription_id='52a442a2-31e9-42f9-8e3e-4b27dbf82673')]. 
 Please refer to aka.ms/aml-notebook-auth for different authentication mechanisms in azureml-sdk.
    InnerException None
    ErrorResponse 
{
    "error": {
        "code": "UserError",
        "message": "You are currently logged-in to 72f988bf-86f1-41af-91ab-2d7cd011db47 tenant. You don't have access to d4404794-ab5b-48de-b7c7-ec1fefb0a04e subscription, please check if it is in this tenant. All the subscriptions that you have access to in this tenant are = \n [SubscriptionInfo(subscription_name='Cosmos_C&E_Azure_AzureEngineeringSystems_100200', subscription_id='8c4b5b03-3b24-4ed0-91f5-a703cd91b412'), SubscriptionInfo(subscription_name='ES-ESP-AS-vPack-Prod', subscription_id='83a9a25f-d922-437f-bc5b-79f3b6827513'), SubscriptionInfo(subscription_name='IDEAs MS Reporting', subscription_id='bac420ed-c6fc-4a05-8ac1-8c0c52da1d6e'), SubscriptionInfo(subscription_name='Code generate Test and Infra', subscription_id='7fd08dcc-a653-4b0f-8f8c-4dac889fdda4'), SubscriptionInfo(subscription_name='Kensho', subscription_id='f92fab0a-38b9-44ed-b800-2ed55fa1b9d9'), SubscriptionInfo(subscription_name='Speech_Project_MaaT_dev', subscription_id='cb64632e-7082-4fb9-aa48-841e2aee2eb4'), SubscriptionInfo(subscription_name='MSAI Search Research', subscription_id='c3547baf-332f-4d8f-96bd-0659b39c7a59'), SubscriptionInfo(subscription_name='msteams.nonprod.pub.msft.msts', subscription_id='407ff5d7-0113-4c5c-8534-f5cfb09298f5'), SubscriptionInfo(subscription_name='Saidi Dev and Test Subscription', subscription_id='588845a8-a4a7-4ab1-83a1-1388452e8c0c'), SubscriptionInfo(subscription_name='rfernand-ML_research_and_tools', subscription_id='41c6e824-0f66-4076-81dd-f751c70a140b'), SubscriptionInfo(subscription_name='Azure ML Team Testing', subscription_id='4aaa645c-5ae2-4ae9-a17a-84b9023bc56a'), SubscriptionInfo(subscription_name='RL & Robotics', subscription_id='c8b7f913-60fb-4759-a310-fc5630e56f99'), SubscriptionInfo(subscription_name='RL Core', subscription_id='90ee78ea-6ff0-40bd-b7f9-a106218f8510'), SubscriptionInfo(subscription_name='GCRProdEx2', subscription_id='46da6261-2167-4e71-8b0d-f4a45215ce61'), SubscriptionInfo(subscription_name='DLTS - Training', subscription_id='20d3c9e4-625d-45e1-ac8a-def90d3c4a88'), SubscriptionInfo(subscription_name='AI Platform \u2013 GCR 1', subscription_id='d4c59fc3-1b01-4872-8981-3ee8cbd79d68'), SubscriptionInfo(subscription_name='GCRProdEx1', subscription_id='7ccdb8ae-4daf-4f0f-8019-e80665eb00d2'), SubscriptionInfo(subscription_name='Singularity Shared', subscription_id='22da88f6-1210-4de2-a5a3-da4c7c2a1213'), SubscriptionInfo(subscription_name='AI Platform GPU 37 - MSR', subscription_id='db9fc1d1-b44e-45a8-902d-8c766c255568'), SubscriptionInfo(subscription_name='AnE.ExP.Production', subscription_id='dad45786-32e5-4ef3-b90e-8e0838fbadb6'), SubscriptionInfo(subscription_name='Edge ExpInsights', subscription_id='f30787b9-82a8-4e74-bb0f-f12d64ecc496'), SubscriptionInfo(subscription_name='Epic-Edge-ES-MergeResolver', subscription_id='482e1993-01d4-4b16-bff4-1866929176a1'), SubscriptionInfo(subscription_name='Epic-Edge-ES-SrcPub-Prod', subscription_id='26596251-f2f3-4e31-8a1b-f0754e32ad73'), SubscriptionInfo(subscription_name='ES-ESP-AS-vPack-Nonprod', subscription_id='4115b323-4aac-47f4-bb13-22af265ed58b'), SubscriptionInfo(subscription_name='TScience', subscription_id='9ec1d932-0f3f-486c-acc6-e7d78b358f9b'), SubscriptionInfo(subscription_name='Purview_Demo_PartnerSandbox', subscription_id='8c2c7b23-848d-40fe-b817-690d79ad9dfd'), SubscriptionInfo(subscription_name='MSFT-Modern Device-Modern Mgmt-Imaging00', subscription_id='29de2cfc-f00a-43bb-bdc8-3108795bd282'), SubscriptionInfo(subscription_name='CLOUDBUILD-ANYBUILD-POC-01', subscription_id='7afc2d66-d5b4-4e84-970b-a782e3e4cc46'), SubscriptionInfo(subscription_name='ER: CE Security Service Operation Center', subscription_id='7d411d23-59e5-4e2e-8566-4f59de4544f2'), SubscriptionInfo(subscription_name='AnyBuild-InternalProdClusters', subscription_id='0368444d-756e-4ca6-9ecd-e964248c227a'), SubscriptionInfo(subscription_name='PPP_ACBB_ATS_AKS_NonProd', subscription_id='cb9eb375-570a-4e75-b83a-77dd942bee9f'), SubscriptionInfo(subscription_name='Weather and Finance INT', subscription_id='009d0e9f-a42a-470e-b315-82496a88cf0f'), SubscriptionInfo(subscription_name='Applied Sciences Group Dev', subscription_id='e686ef8c-d35d-4e9b-92f8-caaaa7948c0a'), SubscriptionInfo(subscription_name='PhillyExt', subscription_id='a20c82c7-4497-4d44-952a-3105f790e26b'), SubscriptionInfo(subscription_name='MSRLabs Azure ML Pilot', subscription_id='710e04b9-9155-4f01-aa8e-52848f055ad2'), SubscriptionInfo(subscription_name='1IS - One Integration Service - NonProduction', subscription_id='0cd6095b-b140-41ec-ad1d-32f2f7493386'), SubscriptionInfo(subscription_name='TScienceGPU', subscription_id='79f57c16-00fe-48da-87d4-5192e86cd047'), SubscriptionInfo(subscription_name='Babel', subscription_id='a1920ebd-59b7-4f19-af9f-5e80599e88e4'), SubscriptionInfo(subscription_name='AnE.ExP.Development', subscription_id='80d2c6c6-fa64-4ab1-8aa5-4e118c6b16ce'), SubscriptionInfo(subscription_name='Skype-NetEM-STAGING', subscription_id='8cff5d56-95fb-4a74-ab9d-079edb45313e'), SubscriptionInfo(subscription_name='ServicesPortfolio MCS', subscription_id='eec2de82-6ab2-4a84-ae5f-57e9a10bf661'), SubscriptionInfo(subscription_name='Edge DevTools Client', subscription_id='d21a0e9f-5e29-4b39-8ba5-0e189bc5fe2d'), SubscriptionInfo(subscription_name='Service Profiler Development', subscription_id='bbe41737-1ade-44df-8e33-217f11b8b452'), SubscriptionInfo(subscription_name='Project Vienna Build', subscription_id='ad203158-bc5d-4e72-b764-2607833a71dc'), SubscriptionInfo(subscription_name='LinuxMdsd Test', subscription_id='13723929-6644-4060-a50a-cc38ebc5e8b1'), SubscriptionInfo(subscription_name='AISC-EngSys-01', subscription_id='eef8b6d5-94da-4b36-9327-a662f2674efb'), SubscriptionInfo(subscription_name='Python_AI_Tools_PM_Team_Sub', subscription_id='1163fbbe-27e7-4b0f-8466-195fe5417043'), SubscriptionInfo(subscription_name='Bing MM Measurement', subscription_id='ae71ef11-a03f-4b4f-a0e6-ef144727c711'), SubscriptionInfo(subscription_name='SPO-CyrusB', subscription_id='8ae1955e-f748-4273-a507-10159ba940f9'), SubscriptionInfo(subscription_name='AISC-DEV-02', subscription_id='b2a328a7-ffff-4c09-b643-a4758cf170bc'), SubscriptionInfo(subscription_name='Pytorch Build', subscription_id='3905431d-c062-4c17-8fd9-c51f89f334c4'), SubscriptionInfo(subscription_name='Traffic manager PPE', subscription_id='56207a5d-4746-4a2d-9f7f-c5ac77a5ddfd'), SubscriptionInfo(subscription_name='Maps Mining Azure', subscription_id='ca38bc19-cf50-48e2-bbe6-8c35b40212d8'), SubscriptionInfo(subscription_name='Terraform Testing on Azure with TTL = 2 Days', subscription_id='85b3dbca-5974-4067-9669-67a141095a76'), SubscriptionInfo(subscription_name='MSR AI Engineering General Purpose', subscription_id='6ad709f4-8451-47eb-b4aa-24733abf60e4'), SubscriptionInfo(subscription_name='Cosmos_AIR_MSR AI_Research (Shared)_100017', subscription_id='7ad724aa-2f5b-49a1-a1b5-3f7d6ebe9a6e'), SubscriptionInfo(subscription_name='Grand Central Resources Production 2', subscription_id='40641f8d-33f8-4948-b0ae-3df7e85e94e9'), SubscriptionInfo(subscription_name='STCA-Segment Intelligence', subscription_id='59575035-46ba-4b83-8025-0cb076c7c097'), SubscriptionInfo(subscription_name='ADF Test sub - App Model V2', subscription_id='0ee78edb-a0ad-456c-a0a2-901bf542c102'), SubscriptionInfo(subscription_name='Azure Portal Telemetry Reporting', subscription_id='4bbecc02-f2c3-402a-8e01-1dfb1ffef499'), SubscriptionInfo(subscription_name='Falcon Dev Cluster', subscription_id='cd0fa82d-b6b6-4361-b002-050c32f71353'), SubscriptionInfo(subscription_name='Core-ES-WorkManagement', subscription_id='52a442a2-31e9-42f9-8e3e-4b27dbf82673')]. \n Please refer to aka.ms/aml-notebook-auth for different authentication mechanisms in azureml-sdk."
    }
}
  File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\site-packages\azureml\core\authentication.py]()", line 337, in _check_if_subscription_exists
    raise UserErrorException("You are currently logged-in to {} tenant. You don't have access "
  File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\site-packages\azureml\core\authentication.py]()", line 688, in _check_if_subscription_exists
    super(InteractiveLoginAuthentication, self)._check_if_subscription_exists(subscription_id,
  File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\site-packages\azureml\core\authentication.py]()", line 229, in _get_service_client
    self._check_if_subscription_exists(subscription_id, all_subscription_list, tenant_id)
  File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\site-packages\azureml\_project\_commands.py]()", line 446, in get_workspace
    workspaces = auth._get_service_client(
  File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\site-packages\azureml\core\workspace.py]()", line 204, in __init__
    auto_rest_workspace = _commands.get_workspace(
  File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\site-packages\azureml\core\workspace.py]()", line 596, in get
    return Workspace(
  File "[C:\github\xt_dilbert\tryOut\sing_test2.py]()", line 7, in <module> (Current frame)
    ws = Workspace.get(name=ws_name, subscription_id=subscription_id, resource_group=resource_group, auth=None)
  File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\runpy.py]()", line 85, in _run_code
    exec(code, run_globals)
  File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\runpy.py]()", line 95, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\runpy.py]()", line 262, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\runpy.py]()", line 85, in _run_code
    exec(code, run_globals)
  File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\runpy.py]()", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,

To Reproduce Steps to reproduce the behavior: run this program:

# sing_test2.py: test out ability to create a workspace object for a singularity workspace
subscription_id = "d4404794-ab5b-48de-b7c7-ec1fefb0a04e"
resource_group = "gcr-singularity-octo"
ws_name = "msroctows"

from azureml.core.workspace import Workspace
ws = Workspace.get(name=ws_name, subscription_id=subscription_id, resource_group=resource_group, auth=None) 
print("ws created: ", ws)

Expected behavior I expect the program to create a workspace object, print some display of it, and then exit without error.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Per the documentation, if auth is not specified, Azure client should use Azure CLI creds or prompt the user for creds. Note - omitting auth works find for most AML workspaces and some Singularity workspaces. This new workspace (see code sample) is the first time this hasn't worked.

ghost commented 2 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @anuragdalmia, @shilpigautam, @ramaganesan-rg.

Issue Details
- **Package Name**: azureml-core - **Package Version**: 1.39.0 - **Operating System**: Windows 11 - **Python Version**: 3.8.0 **Describe the bug** Trying to create a workspace object for an existing Singularity workspace with specifying the "auth" parameter throws the following exception: ``` UserErrorException: Message: You are currently logged-in to 72f988bf-86f1-41af-91ab-2d7cd011db47 tenant. You don't have access to d4404794-ab5b-48de-b7c7-ec1fefb0a04e subscription, please check if it is in this tenant. All the subscriptions that you have access to in this tenant are = [SubscriptionInfo(subscription_name='Cosmos_C&E_Azure_AzureEngineeringSystems_100200', subscription_id='8c4b5b03-3b24-4ed0-91f5-a703cd91b412'), SubscriptionInfo(subscription_name='ES-ESP-AS-vPack-Prod', subscription_id='83a9a25f-d922-437f-bc5b-79f3b6827513'), SubscriptionInfo(subscription_name='IDEAs MS Reporting', subscription_id='bac420ed-c6fc-4a05-8ac1-8c0c52da1d6e'), SubscriptionInfo(subscription_name='Code generate Test and Infra', subscription_id='7fd08dcc-a653-4b0f-8f8c-4dac889fdda4'), SubscriptionInfo(subscription_name='Kensho', subscription_id='f92fab0a-38b9-44ed-b800-2ed55fa1b9d9'), SubscriptionInfo(subscription_name='Speech_Project_MaaT_dev', subscription_id='cb64632e-7082-4fb9-aa48-841e2aee2eb4'), SubscriptionInfo(subscription_name='MSAI Search Research', subscription_id='c3547baf-332f-4d8f-96bd-0659b39c7a59'), SubscriptionInfo(subscription_name='msteams.nonprod.pub.msft.msts', subscription_id='407ff5d7-0113-4c5c-8534-f5cfb09298f5'), SubscriptionInfo(subscription_name='Saidi Dev and Test Subscription', subscription_id='588845a8-a4a7-4ab1-83a1-1388452e8c0c'), SubscriptionInfo(subscription_name='rfernand-ML_research_and_tools', subscription_id='41c6e824-0f66-4076-81dd-f751c70a140b'), SubscriptionInfo(subscription_name='Azure ML Team Testing', subscription_id='4aaa645c-5ae2-4ae9-a17a-84b9023bc56a'), SubscriptionInfo(subscription_name='RL & Robotics', subscription_id='c8b7f913-60fb-4759-a310-fc5630e56f99'), SubscriptionInfo(subscription_name='RL Core', subscription_id='90ee78ea-6ff0-40bd-b7f9-a106218f8510'), SubscriptionInfo(subscription_name='GCRProdEx2', subscription_id='46da6261-2167-4e71-8b0d-f4a45215ce61'), SubscriptionInfo(subscription_name='DLTS - Training', subscription_id='20d3c9e4-625d-45e1-ac8a-def90d3c4a88'), SubscriptionInfo(subscription_name='AI Platform – GCR 1', subscription_id='d4c59fc3-1b01-4872-8981-3ee8cbd79d68'), SubscriptionInfo(subscription_name='GCRProdEx1', subscription_id='7ccdb8ae-4daf-4f0f-8019-e80665eb00d2'), SubscriptionInfo(subscription_name='Singularity Shared', subscription_id='22da88f6-1210-4de2-a5a3-da4c7c2a1213'), SubscriptionInfo(subscription_name='AI Platform GPU 37 - MSR', subscription_id='db9fc1d1-b44e-45a8-902d-8c766c255568'), SubscriptionInfo(subscription_name='AnE.ExP.Production', subscription_id='dad45786-32e5-4ef3-b90e-8e0838fbadb6'), SubscriptionInfo(subscription_name='Edge ExpInsights', subscription_id='f30787b9-82a8-4e74-bb0f-f12d64ecc496'), SubscriptionInfo(subscription_name='Epic-Edge-ES-MergeResolver', subscription_id='482e1993-01d4-4b16-bff4-1866929176a1'), SubscriptionInfo(subscription_name='Epic-Edge-ES-SrcPub-Prod', subscription_id='26596251-f2f3-4e31-8a1b-f0754e32ad73'), SubscriptionInfo(subscription_name='ES-ESP-AS-vPack-Nonprod', subscription_id='4115b323-4aac-47f4-bb13-22af265ed58b'), SubscriptionInfo(subscription_name='TScience', subscription_id='9ec1d932-0f3f-486c-acc6-e7d78b358f9b'), SubscriptionInfo(subscription_name='Purview_Demo_PartnerSandbox', subscription_id='8c2c7b23-848d-40fe-b817-690d79ad9dfd'), SubscriptionInfo(subscription_name='MSFT-Modern Device-Modern Mgmt-Imaging00', subscription_id='29de2cfc-f00a-43bb-bdc8-3108795bd282'), SubscriptionInfo(subscription_name='CLOUDBUILD-ANYBUILD-POC-01', subscription_id='7afc2d66-d5b4-4e84-970b-a782e3e4cc46'), SubscriptionInfo(subscription_name='ER: CE Security Service Operation Center', subscription_id='7d411d23-59e5-4e2e-8566-4f59de4544f2'), SubscriptionInfo(subscription_name='AnyBuild-InternalProdClusters', subscription_id='0368444d-756e-4ca6-9ecd-e964248c227a'), SubscriptionInfo(subscription_name='PPP_ACBB_ATS_AKS_NonProd', subscription_id='cb9eb375-570a-4e75-b83a-77dd942bee9f'), SubscriptionInfo(subscription_name='Weather and Finance INT', subscription_id='009d0e9f-a42a-470e-b315-82496a88cf0f'), SubscriptionInfo(subscription_name='Applied Sciences Group Dev', subscription_id='e686ef8c-d35d-4e9b-92f8-caaaa7948c0a'), SubscriptionInfo(subscription_name='PhillyExt', subscription_id='a20c82c7-4497-4d44-952a-3105f790e26b'), SubscriptionInfo(subscription_name='MSRLabs Azure ML Pilot', subscription_id='710e04b9-9155-4f01-aa8e-52848f055ad2'), SubscriptionInfo(subscription_name='1IS - One Integration Service - NonProduction', subscription_id='0cd6095b-b140-41ec-ad1d-32f2f7493386'), SubscriptionInfo(subscription_name='TScienceGPU', subscription_id='79f57c16-00fe-48da-87d4-5192e86cd047'), SubscriptionInfo(subscription_name='Babel', subscription_id='a1920ebd-59b7-4f19-af9f-5e80599e88e4'), SubscriptionInfo(subscription_name='AnE.ExP.Development', subscription_id='80d2c6c6-fa64-4ab1-8aa5-4e118c6b16ce'), SubscriptionInfo(subscription_name='Skype-NetEM-STAGING', subscription_id='8cff5d56-95fb-4a74-ab9d-079edb45313e'), SubscriptionInfo(subscription_name='ServicesPortfolio MCS', subscription_id='eec2de82-6ab2-4a84-ae5f-57e9a10bf661'), SubscriptionInfo(subscription_name='Edge DevTools Client', subscription_id='d21a0e9f-5e29-4b39-8ba5-0e189bc5fe2d'), SubscriptionInfo(subscription_name='Service Profiler Development', subscription_id='bbe41737-1ade-44df-8e33-217f11b8b452'), SubscriptionInfo(subscription_name='Project Vienna Build', subscription_id='ad203158-bc5d-4e72-b764-2607833a71dc'), SubscriptionInfo(subscription_name='LinuxMdsd Test', subscription_id='13723929-6644-4060-a50a-cc38ebc5e8b1'), SubscriptionInfo(subscription_name='AISC-EngSys-01', subscription_id='eef8b6d5-94da-4b36-9327-a662f2674efb'), SubscriptionInfo(subscription_name='Python_AI_Tools_PM_Team_Sub', subscription_id='1163fbbe-27e7-4b0f-8466-195fe5417043'), SubscriptionInfo(subscription_name='Bing MM Measurement', subscription_id='ae71ef11-a03f-4b4f-a0e6-ef144727c711'), SubscriptionInfo(subscription_name='SPO-CyrusB', subscription_id='8ae1955e-f748-4273-a507-10159ba940f9'), SubscriptionInfo(subscription_name='AISC-DEV-02', subscription_id='b2a328a7-ffff-4c09-b643-a4758cf170bc'), SubscriptionInfo(subscription_name='Pytorch Build', subscription_id='3905431d-c062-4c17-8fd9-c51f89f334c4'), SubscriptionInfo(subscription_name='Traffic manager PPE', subscription_id='56207a5d-4746-4a2d-9f7f-c5ac77a5ddfd'), SubscriptionInfo(subscription_name='Maps Mining Azure', subscription_id='ca38bc19-cf50-48e2-bbe6-8c35b40212d8'), SubscriptionInfo(subscription_name='Terraform Testing on Azure with TTL = 2 Days', subscription_id='85b3dbca-5974-4067-9669-67a141095a76'), SubscriptionInfo(subscription_name='MSR AI Engineering General Purpose', subscription_id='6ad709f4-8451-47eb-b4aa-24733abf60e4'), SubscriptionInfo(subscription_name='Cosmos_AIR_MSR AI_Research (Shared)_100017', subscription_id='7ad724aa-2f5b-49a1-a1b5-3f7d6ebe9a6e'), SubscriptionInfo(subscription_name='Grand Central Resources Production 2', subscription_id='40641f8d-33f8-4948-b0ae-3df7e85e94e9'), SubscriptionInfo(subscription_name='STCA-Segment Intelligence', subscription_id='59575035-46ba-4b83-8025-0cb076c7c097'), SubscriptionInfo(subscription_name='ADF Test sub - App Model V2', subscription_id='0ee78edb-a0ad-456c-a0a2-901bf542c102'), SubscriptionInfo(subscription_name='Azure Portal Telemetry Reporting', subscription_id='4bbecc02-f2c3-402a-8e01-1dfb1ffef499'), SubscriptionInfo(subscription_name='Falcon Dev Cluster', subscription_id='cd0fa82d-b6b6-4361-b002-050c32f71353'), SubscriptionInfo(subscription_name='Core-ES-WorkManagement', subscription_id='52a442a2-31e9-42f9-8e3e-4b27dbf82673')]. Please refer to aka.ms/aml-notebook-auth for different authentication mechanisms in azureml-sdk. InnerException None ErrorResponse { "error": { "code": "UserError", "message": "You are currently logged-in to 72f988bf-86f1-41af-91ab-2d7cd011db47 tenant. You don't have access to d4404794-ab5b-48de-b7c7-ec1fefb0a04e subscription, please check if it is in this tenant. All the subscriptions that you have access to in this tenant are = \n [SubscriptionInfo(subscription_name='Cosmos_C&E_Azure_AzureEngineeringSystems_100200', subscription_id='8c4b5b03-3b24-4ed0-91f5-a703cd91b412'), SubscriptionInfo(subscription_name='ES-ESP-AS-vPack-Prod', subscription_id='83a9a25f-d922-437f-bc5b-79f3b6827513'), SubscriptionInfo(subscription_name='IDEAs MS Reporting', subscription_id='bac420ed-c6fc-4a05-8ac1-8c0c52da1d6e'), SubscriptionInfo(subscription_name='Code generate Test and Infra', subscription_id='7fd08dcc-a653-4b0f-8f8c-4dac889fdda4'), SubscriptionInfo(subscription_name='Kensho', subscription_id='f92fab0a-38b9-44ed-b800-2ed55fa1b9d9'), SubscriptionInfo(subscription_name='Speech_Project_MaaT_dev', subscription_id='cb64632e-7082-4fb9-aa48-841e2aee2eb4'), SubscriptionInfo(subscription_name='MSAI Search Research', subscription_id='c3547baf-332f-4d8f-96bd-0659b39c7a59'), SubscriptionInfo(subscription_name='msteams.nonprod.pub.msft.msts', subscription_id='407ff5d7-0113-4c5c-8534-f5cfb09298f5'), SubscriptionInfo(subscription_name='Saidi Dev and Test Subscription', subscription_id='588845a8-a4a7-4ab1-83a1-1388452e8c0c'), SubscriptionInfo(subscription_name='rfernand-ML_research_and_tools', subscription_id='41c6e824-0f66-4076-81dd-f751c70a140b'), SubscriptionInfo(subscription_name='Azure ML Team Testing', subscription_id='4aaa645c-5ae2-4ae9-a17a-84b9023bc56a'), SubscriptionInfo(subscription_name='RL & Robotics', subscription_id='c8b7f913-60fb-4759-a310-fc5630e56f99'), SubscriptionInfo(subscription_name='RL Core', subscription_id='90ee78ea-6ff0-40bd-b7f9-a106218f8510'), SubscriptionInfo(subscription_name='GCRProdEx2', subscription_id='46da6261-2167-4e71-8b0d-f4a45215ce61'), SubscriptionInfo(subscription_name='DLTS - Training', subscription_id='20d3c9e4-625d-45e1-ac8a-def90d3c4a88'), SubscriptionInfo(subscription_name='AI Platform \u2013 GCR 1', subscription_id='d4c59fc3-1b01-4872-8981-3ee8cbd79d68'), SubscriptionInfo(subscription_name='GCRProdEx1', subscription_id='7ccdb8ae-4daf-4f0f-8019-e80665eb00d2'), SubscriptionInfo(subscription_name='Singularity Shared', subscription_id='22da88f6-1210-4de2-a5a3-da4c7c2a1213'), SubscriptionInfo(subscription_name='AI Platform GPU 37 - MSR', subscription_id='db9fc1d1-b44e-45a8-902d-8c766c255568'), SubscriptionInfo(subscription_name='AnE.ExP.Production', subscription_id='dad45786-32e5-4ef3-b90e-8e0838fbadb6'), SubscriptionInfo(subscription_name='Edge ExpInsights', subscription_id='f30787b9-82a8-4e74-bb0f-f12d64ecc496'), SubscriptionInfo(subscription_name='Epic-Edge-ES-MergeResolver', subscription_id='482e1993-01d4-4b16-bff4-1866929176a1'), SubscriptionInfo(subscription_name='Epic-Edge-ES-SrcPub-Prod', subscription_id='26596251-f2f3-4e31-8a1b-f0754e32ad73'), SubscriptionInfo(subscription_name='ES-ESP-AS-vPack-Nonprod', subscription_id='4115b323-4aac-47f4-bb13-22af265ed58b'), SubscriptionInfo(subscription_name='TScience', subscription_id='9ec1d932-0f3f-486c-acc6-e7d78b358f9b'), SubscriptionInfo(subscription_name='Purview_Demo_PartnerSandbox', subscription_id='8c2c7b23-848d-40fe-b817-690d79ad9dfd'), SubscriptionInfo(subscription_name='MSFT-Modern Device-Modern Mgmt-Imaging00', subscription_id='29de2cfc-f00a-43bb-bdc8-3108795bd282'), SubscriptionInfo(subscription_name='CLOUDBUILD-ANYBUILD-POC-01', subscription_id='7afc2d66-d5b4-4e84-970b-a782e3e4cc46'), SubscriptionInfo(subscription_name='ER: CE Security Service Operation Center', subscription_id='7d411d23-59e5-4e2e-8566-4f59de4544f2'), SubscriptionInfo(subscription_name='AnyBuild-InternalProdClusters', subscription_id='0368444d-756e-4ca6-9ecd-e964248c227a'), SubscriptionInfo(subscription_name='PPP_ACBB_ATS_AKS_NonProd', subscription_id='cb9eb375-570a-4e75-b83a-77dd942bee9f'), SubscriptionInfo(subscription_name='Weather and Finance INT', subscription_id='009d0e9f-a42a-470e-b315-82496a88cf0f'), SubscriptionInfo(subscription_name='Applied Sciences Group Dev', subscription_id='e686ef8c-d35d-4e9b-92f8-caaaa7948c0a'), SubscriptionInfo(subscription_name='PhillyExt', subscription_id='a20c82c7-4497-4d44-952a-3105f790e26b'), SubscriptionInfo(subscription_name='MSRLabs Azure ML Pilot', subscription_id='710e04b9-9155-4f01-aa8e-52848f055ad2'), SubscriptionInfo(subscription_name='1IS - One Integration Service - NonProduction', subscription_id='0cd6095b-b140-41ec-ad1d-32f2f7493386'), SubscriptionInfo(subscription_name='TScienceGPU', subscription_id='79f57c16-00fe-48da-87d4-5192e86cd047'), SubscriptionInfo(subscription_name='Babel', subscription_id='a1920ebd-59b7-4f19-af9f-5e80599e88e4'), SubscriptionInfo(subscription_name='AnE.ExP.Development', subscription_id='80d2c6c6-fa64-4ab1-8aa5-4e118c6b16ce'), SubscriptionInfo(subscription_name='Skype-NetEM-STAGING', subscription_id='8cff5d56-95fb-4a74-ab9d-079edb45313e'), SubscriptionInfo(subscription_name='ServicesPortfolio MCS', subscription_id='eec2de82-6ab2-4a84-ae5f-57e9a10bf661'), SubscriptionInfo(subscription_name='Edge DevTools Client', subscription_id='d21a0e9f-5e29-4b39-8ba5-0e189bc5fe2d'), SubscriptionInfo(subscription_name='Service Profiler Development', subscription_id='bbe41737-1ade-44df-8e33-217f11b8b452'), SubscriptionInfo(subscription_name='Project Vienna Build', subscription_id='ad203158-bc5d-4e72-b764-2607833a71dc'), SubscriptionInfo(subscription_name='LinuxMdsd Test', subscription_id='13723929-6644-4060-a50a-cc38ebc5e8b1'), SubscriptionInfo(subscription_name='AISC-EngSys-01', subscription_id='eef8b6d5-94da-4b36-9327-a662f2674efb'), SubscriptionInfo(subscription_name='Python_AI_Tools_PM_Team_Sub', subscription_id='1163fbbe-27e7-4b0f-8466-195fe5417043'), SubscriptionInfo(subscription_name='Bing MM Measurement', subscription_id='ae71ef11-a03f-4b4f-a0e6-ef144727c711'), SubscriptionInfo(subscription_name='SPO-CyrusB', subscription_id='8ae1955e-f748-4273-a507-10159ba940f9'), SubscriptionInfo(subscription_name='AISC-DEV-02', subscription_id='b2a328a7-ffff-4c09-b643-a4758cf170bc'), SubscriptionInfo(subscription_name='Pytorch Build', subscription_id='3905431d-c062-4c17-8fd9-c51f89f334c4'), SubscriptionInfo(subscription_name='Traffic manager PPE', subscription_id='56207a5d-4746-4a2d-9f7f-c5ac77a5ddfd'), SubscriptionInfo(subscription_name='Maps Mining Azure', subscription_id='ca38bc19-cf50-48e2-bbe6-8c35b40212d8'), SubscriptionInfo(subscription_name='Terraform Testing on Azure with TTL = 2 Days', subscription_id='85b3dbca-5974-4067-9669-67a141095a76'), SubscriptionInfo(subscription_name='MSR AI Engineering General Purpose', subscription_id='6ad709f4-8451-47eb-b4aa-24733abf60e4'), SubscriptionInfo(subscription_name='Cosmos_AIR_MSR AI_Research (Shared)_100017', subscription_id='7ad724aa-2f5b-49a1-a1b5-3f7d6ebe9a6e'), SubscriptionInfo(subscription_name='Grand Central Resources Production 2', subscription_id='40641f8d-33f8-4948-b0ae-3df7e85e94e9'), SubscriptionInfo(subscription_name='STCA-Segment Intelligence', subscription_id='59575035-46ba-4b83-8025-0cb076c7c097'), SubscriptionInfo(subscription_name='ADF Test sub - App Model V2', subscription_id='0ee78edb-a0ad-456c-a0a2-901bf542c102'), SubscriptionInfo(subscription_name='Azure Portal Telemetry Reporting', subscription_id='4bbecc02-f2c3-402a-8e01-1dfb1ffef499'), SubscriptionInfo(subscription_name='Falcon Dev Cluster', subscription_id='cd0fa82d-b6b6-4361-b002-050c32f71353'), SubscriptionInfo(subscription_name='Core-ES-WorkManagement', subscription_id='52a442a2-31e9-42f9-8e3e-4b27dbf82673')]. \n Please refer to aka.ms/aml-notebook-auth for different authentication mechanisms in azureml-sdk." } } File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\site-packages\azureml\core\authentication.py]()", line 337, in _check_if_subscription_exists raise UserErrorException("You are currently logged-in to {} tenant. You don't have access " File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\site-packages\azureml\core\authentication.py]()", line 688, in _check_if_subscription_exists super(InteractiveLoginAuthentication, self)._check_if_subscription_exists(subscription_id, File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\site-packages\azureml\core\authentication.py]()", line 229, in _get_service_client self._check_if_subscription_exists(subscription_id, all_subscription_list, tenant_id) File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\site-packages\azureml\_project\_commands.py]()", line 446, in get_workspace workspaces = auth._get_service_client( File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\site-packages\azureml\core\workspace.py]()", line 204, in __init__ auto_rest_workspace = _commands.get_workspace( File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\site-packages\azureml\core\workspace.py]()", line 596, in get return Workspace( File "[C:\github\xt_dilbert\tryOut\sing_test2.py]()", line 7, in (Current frame) ws = Workspace.get(name=ws_name, subscription_id=subscription_id, resource_group=resource_group, auth=None) File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\runpy.py]()", line 85, in _run_code exec(code, run_globals) File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\runpy.py]()", line 95, in _run_module_code _run_code(code, mod_globals, init_globals, File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\runpy.py]()", line 262, in run_path return _run_module_code(code, init_globals, run_name, File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\runpy.py]()", line 85, in _run_code exec(code, run_globals) File "[C:\Users\rfernand.REDMOND\Anaconda3\envs\exper\Lib\runpy.py]()", line 192, in _run_module_as_main return _run_code(code, main_globals, None, ``` **To Reproduce** Steps to reproduce the behavior: run this program: ``` # sing_test2.py: test out ability to create a workspace object for a singularity workspace subscription_id = "d4404794-ab5b-48de-b7c7-ec1fefb0a04e" resource_group = "gcr-singularity-octo" ws_name = "msroctows" from azureml.core.workspace import Workspace ws = Workspace.get(name=ws_name, subscription_id=subscription_id, resource_group=resource_group, auth=None) print("ws created: ", ws) ``` **Expected behavior** I expect the program to create a workspace object, print some display of it, and then exit without error. **Screenshots** If applicable, add screenshots to help explain your problem. **Additional context** Per the [documentation](https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.workspace.workspace?view=azure-ml-py#azureml-core-workspace-workspace-get), if *auth* is not specified, Azure client should use Azure CLI creds or prompt the user for creds. Note - omitting *auth* works find for most AML workspaces and some Singularity workspaces. This new workspace (see code sample) is the first time this hasn't worked.
Author: rfernand2
Assignees: -
Labels: `bug`, `Service Attention`, `Client`, `customer-reported`, `Subscription`, `ML-CoreUI`
Milestone: -
kristapratico commented 2 years ago

@rfernand2 thanks for your issue, we'll take a look and get back to you.

xiangyan99 commented 2 years ago

@azureml-github

github-actions[bot] commented 7 months ago

Hi @rfernand2, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.