Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DirectConnector/AzureBlobFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
//------------------------------------------------------------

using System.Net;
using Microsoft.Azure.Connectors.DirectClient.Azureblob;
using Microsoft.Azure.Connectors.Sdk;

Check failure on line 6 in DirectConnector/AzureBlobFunctions.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'Connectors' does not exist in the namespace 'Microsoft.Azure' (are you missing an assembly reference?)
using Microsoft.Azure.Connectors.Sdk.Azureblob;

Check failure on line 7 in DirectConnector/AzureBlobFunctions.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'Connectors' does not exist in the namespace 'Microsoft.Azure' (are you missing an assembly reference?)
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
using Microsoft.Extensions.Logging;
Expand All @@ -13,7 +13,7 @@

/// <summary>
/// Azure Functions demonstrating Azure Blob Storage operations using the generated
/// <see cref="AzureblobClient"/> from the DirectClient SDK.
/// <see cref="AzureblobClient"/> from the Connectors SDK.
/// </summary>
/// <remarks>
/// Azure Blob Storage uses key-based auth (accountName + accessKey), not OAuth.
Expand Down
158 changes: 0 additions & 158 deletions DirectConnector/AzureLogAnalyticsFunctions.cs

This file was deleted.

25 changes: 0 additions & 25 deletions DirectConnector/Configuration/ConnectorOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ public class ConnectorOptions
/// </summary>
[ValidateObjectMembers]
public Office365UsersOptions Office365Users { get; set; } = new Office365UsersOptions();

/// <summary>
/// Azure Log Analytics connector options.
/// </summary>
[ValidateObjectMembers]
public AzureLogAnalyticsOptions AzureLogAnalytics { get; set; } = new AzureLogAnalyticsOptions();
}

/// <summary>
Expand Down Expand Up @@ -248,22 +242,3 @@ public class Office365UsersOptions
/// </summary>
public string? ManagedIdentityClientId { get; set; }
}

/// <summary>
/// Configuration options for the Azure Log Analytics connector.
/// </summary>
public class AzureLogAnalyticsOptions
{
/// <summary>
/// The API connection runtime URL for Azure Log Analytics.
/// </summary>
[Required(ErrorMessage = "Connectors:AzureLogAnalytics:ConnectionRuntimeUrl is required.")]
public string ConnectionRuntimeUrl { get; set; } = string.Empty;

/// <summary>
/// Managed identity client ID for user-assigned identity.
/// Set to empty string for system-assigned managed identity.
/// Leave unset (null) to use the DefaultAzureCredential chain (CLI, env vars, etc.).
/// </summary>
public string? ManagedIdentityClientId { get; set; }
}
12 changes: 6 additions & 6 deletions DirectConnector/ConnectorFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
using System.Net;
using System.Text;
using System.Text.Json;
using Microsoft.Azure.Connectors.DirectClient.Office365;
using Microsoft.Azure.Connectors.DirectClient.Sharepointonline;
using Microsoft.Azure.Connectors.DirectClient.Teams;
using Microsoft.Azure.Connectors.Sdk;

Check failure on line 8 in DirectConnector/ConnectorFunctions.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'Connectors' does not exist in the namespace 'Microsoft.Azure' (are you missing an assembly reference?)
using Microsoft.Azure.Connectors.Sdk.Office365;

Check failure on line 9 in DirectConnector/ConnectorFunctions.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'Connectors' does not exist in the namespace 'Microsoft.Azure' (are you missing an assembly reference?)
using Microsoft.Azure.Connectors.Sdk.Sharepointonline;

Check failure on line 10 in DirectConnector/ConnectorFunctions.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'Connectors' does not exist in the namespace 'Microsoft.Azure' (are you missing an assembly reference?)
using Microsoft.Azure.Connectors.Sdk.Teams;

Check failure on line 11 in DirectConnector/ConnectorFunctions.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'Connectors' does not exist in the namespace 'Microsoft.Azure' (are you missing an assembly reference?)
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
using Microsoft.Extensions.Logging;
using SharePointBlobMetadata = Microsoft.Azure.Connectors.DirectClient.Sharepointonline.BlobMetadata;
using SharePointBlobMetadata = Microsoft.Azure.Connectors.Sdk.Sharepointonline.BlobMetadata;

Check failure on line 15 in DirectConnector/ConnectorFunctions.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'Connectors' does not exist in the namespace 'Microsoft.Azure' (are you missing an assembly reference?)

namespace DirectConnector;

/// <summary>
/// Azure Functions that use the generated <see cref="Office365Client"/>, <see cref="SharepointonlineClient"/>,
/// and <see cref="TeamsClient"/> from the DirectClient SDK.
/// and <see cref="TeamsClient"/> from the Connectors SDK.
/// </summary>
/// <remarks>
/// Demonstrates DI-based lifetime management, JSON deserialization for structured responses,
Expand Down Expand Up @@ -1178,7 +1178,7 @@
// The actual message body properties are determined at runtime by the connector's schema
// discovery endpoint. With [JsonExtensionData] on AdditionalProperties, arbitrary properties
// are now serialized correctly. Populate the dictionary with the expected message fields.
var messageRequest = new Microsoft.Azure.Connectors.DirectClient.Teams.DynamicPostMessageRequest();
var messageRequest = new Microsoft.Azure.Connectors.Sdk.Teams.DynamicPostMessageRequest();
messageRequest.AdditionalProperties["recipient"] = JsonSerializer.SerializeToElement(
new
{
Expand Down
2 changes: 1 addition & 1 deletion DirectConnector/ConnectorTriggerMetadataAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public sealed class ConnectorTriggerMetadataAttribute : Attribute

/// <summary>
/// The trigger operation name. Use constants from the connector's <c>*TriggerOperations</c> class
/// (e.g., <see cref="Microsoft.Azure.Connectors.DirectClient.Office365.Office365TriggerOperations"/>).
/// (e.g., <see cref="Microsoft.Azure.Connectors.Sdk.Office365.Office365TriggerOperations"/>).
/// </summary>
public string OperationName { get; set; } = "";

Expand Down
4 changes: 3 additions & 1 deletion DirectConnector/DirectConnector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="10.0.7" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Connectors.Sdk" Version="0.8.0-preview.1" />
<!-- Temporary: consume local SDK branch for namespace-rename validation.
Revert to NuGet package reference after SDK v0.9.0 is published. -->
<ProjectReference Include="..\..\Connectors-NET-SDK-ns-rename\src\Microsoft.Azure.Connectors.Sdk\Microsoft.Azure.Connectors.Sdk.csproj" />
</ItemGroup>
Comment thread
daviburg marked this conversation as resolved.
Comment on lines +17 to 20
<ItemGroup>
<None Update="host.json">
Expand Down
4 changes: 2 additions & 2 deletions DirectConnector/MqFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

using System.Net;
using System.Text.Json;
using Microsoft.Azure.Connectors.DirectClient.Mq;
using Microsoft.Azure.Connectors.Sdk;

Check failure on line 7 in DirectConnector/MqFunctions.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'Connectors' does not exist in the namespace 'Microsoft.Azure' (are you missing an assembly reference?)
using Microsoft.Azure.Connectors.Sdk.Mq;

Check failure on line 8 in DirectConnector/MqFunctions.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'Connectors' does not exist in the namespace 'Microsoft.Azure' (are you missing an assembly reference?)
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
using Microsoft.Extensions.Logging;
Expand All @@ -14,7 +14,7 @@

/// <summary>
/// Azure Functions demonstrating IBM MQ operations using the generated
/// <see cref="MqClient"/> from the DirectClient SDK.
/// <see cref="MqClient"/> from the Connectors SDK.
/// </summary>
/// <remarks>
/// IBM MQ uses parameter-based auth (server, queue manager, channel, credentials).
Expand Down
4 changes: 2 additions & 2 deletions DirectConnector/MsGraphFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
//------------------------------------------------------------

using System.Net;
using Microsoft.Azure.Connectors.DirectClient.Msgraphgroupsanduser;
using Microsoft.Azure.Connectors.Sdk;

Check failure on line 6 in DirectConnector/MsGraphFunctions.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'Connectors' does not exist in the namespace 'Microsoft.Azure' (are you missing an assembly reference?)
using Microsoft.Azure.Connectors.Sdk.Msgraphgroupsanduser;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
using Microsoft.Extensions.Logging;
Expand All @@ -13,7 +13,7 @@

/// <summary>
/// Azure Functions demonstrating MS Graph Groups &amp; Users operations using the generated
/// <see cref="MsgraphgroupsanduserClient"/> from the DirectClient SDK.
/// <see cref="MsgraphgroupsanduserClient"/> from the Connectors SDK.
/// </summary>
/// <remarks>
/// Exercises user listing, group search, and group property retrieval.
Expand Down
4 changes: 2 additions & 2 deletions DirectConnector/Office365UsersFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
//------------------------------------------------------------

using System.Net;
using Microsoft.Azure.Connectors.DirectClient.Office365users;
using Microsoft.Azure.Connectors.Sdk;
using Microsoft.Azure.Connectors.Sdk.Office365users;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
using Microsoft.Extensions.Logging;
Expand All @@ -13,7 +13,7 @@ namespace DirectConnector;

/// <summary>
/// Azure Functions demonstrating Office 365 Users operations using the generated
/// <see cref="Office365usersClient"/> from the DirectClient SDK.
/// <see cref="Office365usersClient"/> from the Connectors SDK.
/// </summary>
public class Office365UsersFunctions
{
Expand Down
6 changes: 3 additions & 3 deletions DirectConnector/OneDriveFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
using System.Net;
using System.Text;
using System.Text.Json;
using Microsoft.Azure.Connectors.DirectClient.Onedriveforbusiness;
using Microsoft.Azure.Connectors.Sdk;
using Microsoft.Azure.Connectors.Sdk.Onedriveforbusiness;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
using Microsoft.Extensions.Logging;
using OneDriveBlobMetadata = Microsoft.Azure.Connectors.DirectClient.Onedriveforbusiness.BlobMetadata;
using OneDriveBlobMetadata = Microsoft.Azure.Connectors.Sdk.Onedriveforbusiness.BlobMetadata;

namespace DirectConnector;

/// <summary>
/// Azure Functions demonstrating OneDrive for Business operations using the generated
/// <see cref="OnedriveforbusinessClient"/> from the DirectClient SDK.
/// <see cref="OnedriveforbusinessClient"/> from the Connectors SDK.
/// </summary>
/// <remarks>
/// Exercises folder listing, file download/upload, search, sharing links,
Expand Down
30 changes: 9 additions & 21 deletions DirectConnector/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
//------------------------------------------------------------

using DirectConnector.Configuration;
using Microsoft.Azure.Connectors.DirectClient.Azureblob;
using Microsoft.Azure.Connectors.DirectClient.Azureloganalytics;
using Microsoft.Azure.Connectors.DirectClient.Mq;
using Microsoft.Azure.Connectors.DirectClient.Msgraphgroupsanduser;
using Microsoft.Azure.Connectors.DirectClient.Office365;
using Microsoft.Azure.Connectors.DirectClient.Office365users;
using Microsoft.Azure.Connectors.DirectClient.Onedriveforbusiness;
using Microsoft.Azure.Connectors.DirectClient.Sharepointonline;
using Microsoft.Azure.Connectors.DirectClient.Smtp;
using Microsoft.Azure.Connectors.DirectClient.Teams;
using Microsoft.Azure.Connectors.Sdk.Azureblob;
using Microsoft.Azure.Connectors.Sdk.Mq;
using Microsoft.Azure.Connectors.Sdk.Msgraphgroupsanduser;
using Microsoft.Azure.Connectors.Sdk.Office365;
using Microsoft.Azure.Connectors.Sdk.Office365users;
using Microsoft.Azure.Connectors.Sdk.Onedriveforbusiness;
using Microsoft.Azure.Connectors.Sdk.Sharepointonline;
using Microsoft.Azure.Connectors.Sdk.Smtp;
using Microsoft.Azure.Connectors.Sdk.Teams;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand Down Expand Up @@ -145,17 +144,6 @@
options.Office365Users.ManagedIdentityClientId)
: new Office365usersClient(options.Office365Users.ConnectionRuntimeUrl);
});

services.AddSingleton<AzureloganalyticsClient>(serviceProvider =>
{
var options = serviceProvider.GetRequiredService<IOptions<ConnectorOptions>>().Value;

return options.AzureLogAnalytics.ManagedIdentityClientId != null
? new AzureloganalyticsClient(
options.AzureLogAnalytics.ConnectionRuntimeUrl,
options.AzureLogAnalytics.ManagedIdentityClientId)
: new AzureloganalyticsClient(options.AzureLogAnalytics.ConnectionRuntimeUrl);
});
})
.Build();

Expand Down
Loading
Loading