from azureml.core.authentication import InteractiveLoginAuthentication
from azureml.core import Workspace

interactive_auth = InteractiveLoginAuthentication(tenant_id='')
ws = Workspace.create(
    name='azure-ml-demand',
    subscription_id='',
    resource_group='demand_machine_learning',
    create_resource_group=True,
    location='eastus2',
    auth=interactive_auth
)

ws.write_config(path='.azureml')
