azure-sdk-for-net | active development of the Azure SDK | Azure library
kandi X-RAY | azure-sdk-for-net Summary
kandi X-RAY | azure-sdk-for-net Summary
This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs or our versioned developer docs.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of azure-sdk-for-net
azure-sdk-for-net Key Features
azure-sdk-for-net Examples and Code Snippets
Community Discussions
Trending Discussions on azure-sdk-for-net
QUESTION
Right now, I have MS Teams Bot running under App Registration configured to use "Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)".
To begin with, I did a research on that topic and I am writing this question having in mind following resources:
- Comment on issue #9498 @ azure-sdk-for-net
- Azure Bot App Registration requiring multi-tenancy when single-tenant is prefered
- Bot Framework - App registration - Single tenant vs Multi tenant
All these answers, from my understanding, comes to this:
- prior to late 2021 only Multi-tenant apps as bot identity were supported
- now I should be able to use the Single-tenat for app registration, but that requires additional configuration
- moment when mentioned changes are in effect is a moment when Bot is trying to authenticate
As other bots imperatively (explicitly) authorize using ex. MicrosoftAppCredentials
- MS Teams Bots have their authorization details configured declaratively in XML files like appsettings.json
in bot service.
How can I use Single tenant App Registration with Azure Bot used in MS Teams? Or is it not possible currently?
EDIT:
For future reader: using the answer, I prepared two places where you can access TenantId of incoming activity to perform whitelisting validation (in Multi-tenant setup, because Single-tenant is still not working on Teams):
- In
BotController
:
ANSWER
Answered 2022-Mar-31 at 11:01I ran into this with another user on this site recently, where Proactive Messaging would not work because they had selected Single Tenant. It's a recent option, and it seems broken from my research - I would go with the MultiTenant option. If you really need to block the bot from being accessible from other tenants (which could well be recommended as it's possible for a bot to be access by any user in any Teams tenant, it might be best to white-list your Tenant Id(s). There's an old sample on how to do this here - haven't tested if it's still working: https://github.com/OfficeDev/microsoft-teams-sample-complete-csharp/blob/master/template-bot-master-csharp/middleware/Middleware.cs
QUESTION
I am working with an Azure Blob Storage container that has a number of fake folder structures within and where the file(s) are housed.
I am trying to use this code block to get me the hierarchical values and the blobs so that I can return them to a calling method.
...ANSWER
Answered 2022-Mar-24 at 15:06I was able to get the data properly. Here's the code I used:
QUESTION
I'm trying to access Azure Table Storage using the TableClient class, but I want to authenticate using AzureAD credentials via the browser popup.
I have tried 2 approaches and are sure I have things configured correctly in Azure, but I just keep getting
This request is not authorized to perform this operation using this permission.
Here is test code 1 using MSAL
...ANSWER
Answered 2022-Mar-23 at 15:58To access table data using your Azure AD credentials, your user account should be assigned either Storage Table Data Contributor
or Storage Table Data Reader
role.
Please assign one of these roles to your user account and re-acquire the token. You should not get the error you are getting then.
QUESTION
Looking out for .NET SDK references to get a specified container registry or all the container registries in a resource group or the subscription.
Need references apart from the REST API available:
https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries?api-version=2019-05-01
I have seen that the operation is available through Powershell and CLI cmdlet; Get-AzContainerRegistry
and az acr list
, but looking out for .NET SDK based library references (Azure.ResourceManager preferred) for the same.
I have gone through https://github.com/Azure/azure-sdk-for-net, but there's no extension related to get a specific or list the container registries under a subscription.
...ANSWER
Answered 2022-Feb-15 at 09:18Nuget packages:
QUESTION
Environment:
...ANSWER
Answered 2022-Jan-28 at 16:09Thanks to @Christopher Scott - the solution was to install the following NuGet package:
QUESTION
When using Microsoft.Azure.Devices.Client.DeviceClient .net framework 4.8 closing out the application leaves multiple Threads running. Specifically DotNetty.Common.dll! DotNetty.Common.Concurrency.SingleThreadEventExecutor.PollTask
Versions 1.34.0 & 1.35.0 of Microsoft.Azure.Devices have this same problem. Are we using DeviceClient improperly? Is it a async thing im not understanding? Am i missing a call to shut it down properly?
From examples online, i shouldn't have to do anything special and it should close it self out. However it still hangs, currently this is a close implementation. I have yet to make a stand alone, so i havent duplicated this problem with only DeviceClient Code running
When the program exits, is_running gets set, and the program closes down other threads. Eventually we call Environment.Exit(0);
This should be all the relevant code
...ANSWER
Answered 2022-Jan-25 at 22:08https://github.com/Azure/azure-sdk-for-net/issues/24550 https://github.com/Azure/azure-iot-sdk-csharp/issues/2194
Not a configuration issue, a 'dot netty' bug was hanging. The fix, get a newer azure version Microsoft.Azure.Devices > 1.35.0
QUESTION
I am using Azure.Messaging.ServiceBus library.
I create ServiceBusClient
and ServiceBusProcessor
to start receiving queue messages like this:
ANSWER
Answered 2021-Nov-12 at 10:22Can it be that
await processor.DisposeAsync()
is not needed at all, sinceserviceBusClient.DisposeAsync()
should do all the job?
Yes await processor.DisposeAsync()
is not needed, because calling either serviceBusClient.DisposeAsync()
or CloseAsync
should do all the job and will ensure that network resources and other unmanaged objects are properly cleaned up.
And also when a ServiceBusClient
instance is disposed, it will automatically close and cleanup any senders, receivers, and processors that were created using it.
QUESTION
I have the following error when I start the masstransit with azure bus.Start();
on my function StartService()
I have configuring my azure with masstransit and autofact. The error:
ANSWER
Answered 2021-Jul-28 at 19:33It's likely permissions. MassTransit requires Manage, and you're configuring the managed identity token provider.
- Remove the shared access credentials from the connection string, since they would conflict with the managed identity provider.
- Make sure the service identity has Manage permissions on the namespace.
QUESTION
I am able to upload blobs containing cyrillic characters using Azure.Storage.Blobs 12.9.1
but then am unable to batch delete them using Azure.Storage.Blobs.Batch 12.6.0
.
Consider the following blob name: здраве-и-красота-от-природатаjpg--xfgqfvhj.axp.webp and code:
...ANSWER
Answered 2021-Jul-18 at 04:54Please try something like the following. It is a bit convoluted approach and the SDK can certainly be improved but it works:
QUESTION
I wrote a code to read 1000 messages one shot from an Azure Service Bus queue. I read the messages with the line: await receiver.ReceiveMessagesAsync(1000);
but only a subset of the messages are received.
I took the code from the sample: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Samples/Sample01_HelloWorld.cs, the SendAndReceiveMessageSafeBatch() method
This is my code:
...ANSWER
Answered 2021-Jul-10 at 02:28This is expected behaviour with Azure Service Bus. The number of messages to receive, maxMessages
is a maximum number that is not guaranteed.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install azure-sdk-for-net
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page