You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: providers/microsoft/azure/docs/connections/azure.rst
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,8 @@ Extra (optional)
74
74
It specifies the json that contains the authentication information.
75
75
* ``managed_identity_client_id``: The client ID of a user-assigned managed identity. If provided with ``workload_identity_tenant_id``, they'll pass to DefaultAzureCredential_.
76
76
* ``workload_identity_tenant_id``: ID of the application's Microsoft Entra tenant. Also called its "directory" ID. If provided with ``managed_identity_client_id``, they'll pass to DefaultAzureCredential_.
77
+
* ``use_azure_identity_object``: If set to true, it will use credential of newer type: ClientSecretCredential or DefaultAzureCredential instead of ServicePrincipalCredentials or AzureIdentityCredentialAdapter.
78
+
These newer credentials support get_token method which can be used to generate OAuth token with custom scope.
77
79
78
80
The entire extra column can be left out to fall back on DefaultAzureCredential_.
Azure Identity based credential object (``ClientSecretCredential``, ``DefaultAzureCredential``) can be used to get OAuth token using ``get_token`` method.
141
+
Older Credential objects (``ServicePrincipalCredentials``, ``AzureIdentityCredentialAdapter``) are supported for backward compatibility.
142
+
143
+
:return: The Azure credential object
144
+
"""
145
+
ifnotconn:
146
+
conn=self.get_connection(self.conn_id)
147
+
tenant=conn.extra_dejson.get("tenantId")
148
+
credential: (
149
+
ServicePrincipalCredentials
150
+
|AzureIdentityCredentialAdapter
151
+
|ClientSecretCredential
152
+
|DefaultAzureCredential
153
+
)
115
154
ifall([conn.login, conn.password, tenant]):
116
-
self.log.info("Getting connection using specific credentials and subscription_id.")
0 commit comments