azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

Factory Class default value for identity

Open Quisl opened this issue 6 years ago • 4 comments

Is your feature request related to a problem? Please describe. When I create an Azure Data Factory with the SDK (or REST API) it does not have a SystemAssigned identity. However, when I create it via the Azure Portal or Powershell it does.

According to the documentation, this is expected behaviour: https://docs.microsoft.com/en-us/azure/data-factory/data-factory-service-identity#generate-managed-identity

However, I find it confusing that not all Azure connections work the same way.

Describe the solution you'd like Can you set the default value of identity to

FactoryIdentity(type="SystemAssigned")

or something like this?:

https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory.py#L77

Describe alternatives you've considered An other way is that Data Factories should never come with a managed identity (--> change behaviour of PowerShell and Azure Portal). This would reduce confusion. Then the SDK users always need to import FactoryIdentity manually whenever they need it (current behaviour). But at least they will know that they need to do it in the first place.

Additional context I'm not exactly sure of the consequences. But I can not imagine of the reasoning behind the current behaviour. Are there any negative consequences if you always had a managed identity for all Azure Data Factories?

Quisl avatar Jan 20 '20 10:01 Quisl

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

ghost avatar Jan 21 '20 19:01 ghost

@shawnxzq to take a look

lmy269 avatar Jan 28 '20 21:01 lmy269

Hi, this syntax works to create a Factory object and assign it a system identity:

Factory(location="eastus",identity=FactoryIdentity())

bigdatamoore avatar Apr 29 '20 19:04 bigdatamoore

Thanks @bigdatamoore ! Closing the issue

lmazuel avatar May 05 '20 19:05 lmazuel