Repository: PrefectHQ/prefect

Issue:
Add service principal auth support to `Azure` block
### First check

- [X] I added a descriptive title to this issue.
- [X] I used the GitHub search to find a similar request and didn't find it.
- [X] I searched the Prefect documentation for this feature.

### Prefect Version

2.x

### Describe the current behavior

Currently, two out of three common Azure authentication methods are supported:
- [x] account key
- [x] connection string
- [ ] service principal

### Describe the proposed behavior

`adlfs` supports this already:
```python
from adlfs import AzureBlobFileSystem

fs = AzureBlobFileSystem(
    account_name=storage_account_name,
    tenant_id=tenant_id,
    client_id=client_id,
    client_secret=client_secret,
)
```

### Example Use

_No response_

### Additional context

_No response_


Discussion:
I can take this one BTW

Resolving patch:
diff --git a/src/prefect/filesystems.py b/src/prefect/filesystems.py
--- a/src/prefect/filesystems.py
+++ b/src/prefect/filesystems.py
@@ -616,6 +616,21 @@ class Azure(WritableFileSystem, WritableDeploymentStorage):
         title="Azure storage account key",
         description="Equivalent to the AZURE_STORAGE_ACCOUNT_KEY environment variable.",
     )
+    azure_storage_tenant_id: Optional[SecretStr] = Field(
+        None,
+        title="Azure storage tenant ID",
+        description="Equivalent to the AZURE_TENANT_ID environment variable.",
+    )
+    azure_storage_client_id: Optional[SecretStr] = Field(
+        None,
+        title="Azure storage client ID",
+        description="Equivalent to the AZURE_CLIENT_ID environment variable.",
+    )
+    azure_storage_client_secret: Optional[SecretStr] = Field(
+        None,
+        title="Azure storage client secret",
+        description="Equivalent to the AZURE_CLIENT_SECRET environment variable.",
+    )
     _remote_file_system: RemoteFileSystem = None
 
     @property
@@ -635,6 +650,14 @@ def filesystem(self) -> RemoteFileSystem:
             ] = self.azure_storage_account_name.get_secret_value()
         if self.azure_storage_account_key:
             settings["account_key"] = self.azure_storage_account_key.get_secret_value()
+        if self.azure_storage_tenant_id:
+            settings["tenant_id"] = self.azure_storage_tenant_id.get_secret_value()
+        if self.azure_storage_client_id:
+            settings["client_id"] = self.azure_storage_client_id.get_secret_value()
+        if self.azure_storage_client_secret:
+            settings[
+                "client_secret"
+            ] = self.azure_storage_client_secret.get_secret_value()
         self._remote_file_system = RemoteFileSystem(
             basepath=f"az://{self.bucket_path}", settings=settings
         )


Test patch:
diff --git a/tests/blocks/checksums.json b/tests/blocks/checksums.json
--- a/tests/blocks/checksums.json
+++ b/tests/blocks/checksums.json
@@ -9,7 +9,7 @@
     "remote-file-system": "sha256:f6998c8723a78207471938f5f74d6d4815ff14c2900caf8e9c3b3ece47bfeb40",
     "s3": "sha256:77690b4ef54ef3edc93fca6ac54bc540a32ca07169e91aecd36e49b2e1eeebc5",
     "gcs": "sha256:1daf535b60cf9304103bcb4015280a30fd6bdd9686aa0c059eb9715082b5b3ec",
-    "azure": "sha256:f26ee075481470374a3084b12031692f5f2c6106556d24980bf060c5a1313470",
+    "azure": "sha256:f59d267379bb10d0428d077c899c9887982c120956602b6cb62fc6d1c312a92f",
     "smb": "sha256:d5746a564cf05bec13770a882f76ca8e8f562c8bdc7a6d2d45732b079bf72045",
     "github": "sha256:196e3675d678bda766b96c223c5dd5d87223f556150ce5e63f55f0775feec972",
     "kubernetes-cluster-config": "sha256:90d421e948bfbe4cdc98b124995f0edd0f84b0837549ad1390423bad8e31cf3b",
@@ -17,4 +17,4 @@
     "docker-container": "sha256:ee3348b26a5d0e0226e2d3cf6f2e85a3592c3b19fb8a988dfccceee972b9b9eb",
     "kubernetes-job": "sha256:686f931093d8fa3a80dee6eb66516be7b022bf29c44a38766da8571f25fede8b",
     "process": "sha256:227b03037cf895d9a70603554b792f573e7e59b81a585d51a43ec1f826e81da3"
-}
+}
\ No newline at end of file