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.52k stars 2.75k forks source link

AzureDatabricksLinkedService does not support MSI authentication #16249

Closed lmk-coles closed 3 years ago

lmk-coles commented 3 years ago

Describe the bug The management model AzureDatabricksLinkedService only supports tokens and does not support MSI authentication.

Exception or Stack Trace

....snip....
 File "/apps/agent/_work/20/source/venv/lib64/python3.6/site-packages/azure/mgmt/datafactory/operations/_linked_services_operations.py", line 170, in create_or_update
    body_content = self._serialize.body(linked_service, 'LinkedServiceResource')
  File "/apps/agent/_work/20/source/venv/lib64/python3.6/site-packages/msrest/serialization.py", line 628, in body
    raise errors[0]
  File "/apps/agent/_work/20/source/venv/lib64/python3.6/site-packages/msrest/serialization.py", line 250, in validate
    Serializer.validate(value, debug_name, **self._validation.get(attr_name, {}))
  File "/apps/agent/_work/20/source/venv/lib64/python3.6/site-packages/msrest/serialization.py", line 730, in validate
    raise ValidationError("required", name, True)
msrest.exceptions.ValidationError: Parameter 'AzureDatabricksLinkedService.access_token' can not be None.

To Reproduce Instantiate AzureDatabricksLinkedService with token=None and authentication="MSI".

Code Snippet N/A

Expected behavior The model should support MSI auth as this is supported via DataFactory JSON configuration.

Setup (please complete the following information):

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @shawnxzq, @lmy269.

Issue Details
**Describe the bug** The management model `AzureDatabricksLinkedService` only supports tokens and does not support MSI authentication. ***Exception or Stack Trace*** ``` ....snip.... File "/apps/agent/_work/20/source/venv/lib64/python3.6/site-packages/azure/mgmt/datafactory/operations/_linked_services_operations.py", line 170, in create_or_update body_content = self._serialize.body(linked_service, 'LinkedServiceResource') File "/apps/agent/_work/20/source/venv/lib64/python3.6/site-packages/msrest/serialization.py", line 628, in body raise errors[0] File "/apps/agent/_work/20/source/venv/lib64/python3.6/site-packages/msrest/serialization.py", line 250, in validate Serializer.validate(value, debug_name, **self._validation.get(attr_name, {})) File "/apps/agent/_work/20/source/venv/lib64/python3.6/site-packages/msrest/serialization.py", line 730, in validate raise ValidationError("required", name, True) msrest.exceptions.ValidationError: Parameter 'AzureDatabricksLinkedService.access_token' can not be None. ``` **To Reproduce** Instantiate `AzureDatabricksLinkedService` with `token=None` and `authentication="MSI"`. ***Code Snippet*** N/A **Expected behavior** The model should support MSI auth as this is supported via DataFactory JSON configuration. **Setup (please complete the following information):** - Python Version: Python 3.8 - SDK Version: `azure-mgmt-datafactory==1.0.0` **Information Checklist** Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report - [x] Bug Description Added - [x] Repro Steps Added - [x] Setup information Added
Author: lmk-coles
Assignees: 00Kai0
Labels: `Data Factory`, `Mgmt`, `Service Attention`, `Track2`, `bug`, `customer-reported`, `question`
Milestone: -
shawnxzq commented 3 years ago

@lmk-coles This is already fixed in the latest swagger & .net SDK, python SDK is coming, thanks!

shawnxzq commented 3 years ago

@lmk-coles The python SDK is coming in a few days and @00Kai0 is actively working on this now, feel free to let us know if you still have any issue, thanks!

renardeinside commented 3 years ago

@lmk-coles any update on this? I'm using:

azure-mgmt-datafactory==1.0.0

But it fails with the same error.