Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support injecting TableServiceClient #115

Open
martincostello opened this issue Jul 8, 2024 · 0 comments
Open

Support injecting TableServiceClient #115

martincostello opened this issue Jul 8, 2024 · 0 comments
Assignees

Comments

@martincostello
Copy link
Contributor

When using TableServiceClient with .NET Aspire, the recommended approach is to configure just the URI for the table and use RBAC to configure permissions to access the table.

However if the "connection string" is just a URI, the below fails as that is not a valid connection string:

_client = new TableServiceClient(config.StorageConnectionString);

.NET Aspire supports both connection strings and a service URI to create instances of TableServiceClient.

For now I've stuck with using a storage connection string to both IdentityCloudContext and .NET Aspire work together with the same configuration setting. The ideal solution would be for IdentityCloudContext to allow a way to inject a TableServiceClient (e.g. a factory delegate property on IdentityConfiguration) so that the client registered with DI by .NET Aspire can be used instead of this library creating one itself.

@dlmelendez dlmelendez self-assigned this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants