azure-sdk | This is the Azure SDK parent repository and mostly contains documentation around guidelines and poli | Azure library
kandi X-RAY | azure-sdk Summary
kandi X-RAY | azure-sdk Summary
The Azure SDK delivers a platform for developers to leverage the wide variety of Azure services in their language of choice. The source for the client libraries exists for the most part in repositories for each language. This repository is meant to be a jumping off point into those language specific repositories. Issues related to a specific language should be opened in the corresponding repository but cross cutting issues can be opened in this repository. Service teams should schedule reviews of their client libraries with the Azure SDK Architecture Board. See the Review Process for more information.
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
azure-sdk Key Features
azure-sdk Examples and Code Snippets
Community Discussions
Trending Discussions on azure-sdk
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 have a function that returns a specific type of client and I want to test the function by checking if the type of the variable returned is of the type azblob.BlockBlobClient
.
When I use a simple if
statement to check the type like this: if var == azblob.BlockBlobClient
I get the error azblob.BlockBlobClient (type) is not an expression
What's the proper way to test for variable types with the standard testing
package?
Much thanks in advance!
//func
...ANSWER
Answered 2022-Mar-28 at 15:30You don't really need to do this because the function you have wrote only returns the azblob.BlockBlobClient
type, the compiler will check this before even building the tests. The test would fail to run if this was not the case.
I made the following changes to show this:
//funcQUESTION
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
I want to create an Azure virtual machine with the VM extension(Custom script extension) using the python SDK. Basically, I want a python program that will create the VM with VM extension using the Azure SDK management libraries, I am able to use the Azure SDK management libraries in a Python script to create a resource group that contains a Linux virtual machine. https://docs.microsoft.com/en-us/azure/developer/python/azure-sdk-example-virtual-machines?tabs=cmd
But I need my Virtual machine with VM extension in it.
...ANSWER
Answered 2022-Mar-09 at 10:04As of now, we don't have proper documentation related to the creation of VM with extension.
Here is the SDK reference document for creating and updating the extension
VirtualMachineExtensionsOperations(client, config, serializer, deserializer)
Here is the sample code to create the extension
begin_create_or_update(resource_group_name: str, vm_name: str, vm_extension_name: str, extension_parameters: "_models.VirtualMachineExtension", **kwargs: Any) -> LROPoller['_models.VirtualMachineExtension']
Here is the document for creation Virtual machine using python.
QUESTION
Is it possible to ignore a custom MarshalJSON
implementation of a struct,
and use just standard marshaling function instead?
The struct is complex, and has a lot of nested structs, all of which are
using custom MarshalJSON
, and I would like to ignore them all.
I feel that it should be trivial. Do you have an idea?
Some details
An obvious solution with a new type creation does not work well, because the nested structs still use their MarshalJSON
s.
Here is an example of the code:
...ANSWER
Answered 2022-Mar-02 at 19:28You can do this two ways:
- custom types (to hide the
MarshalJSON
methods); or - custom marshaler (using
reflect
to ignore anyMarshalJSON
methods at runtime)
For example, take these nested types:
QUESTION
So I'm testing the waters with Go. I need to manually make a REST call to an Azure AD protected endpoint. I'm using the Azure Identity package, but still I am not able to get the token.
...ANSWER
Answered 2022-Feb-23 at 05:50context.Context is an interface, not a method (https://pkg.go.dev/context#Context) that is why you're getting the error, you're attempting to convert nothing to that type.
Calls to the GetToken method require something that implements context.Context.
Try replacing var ctx = context.Context()
with var ctx = context.Background()
Read more about context.Context here https://pkg.go.dev/context
QUESTION
I have successfully created a MS Graph Client using Azure AD and JAVA. I have used the ClientSecretCredential for authentication. I believe the access token being received is valid too. However, I now want to get access to my (outlook) mailbox, using MS Graph and JAVA, to count the total number of emails in my Inbox Folder. Please find my code and errors below. I think it's because the code is for Delegated and not Application Permissions. Kindly help.
...ANSWER
Answered 2022-Feb-18 at 13:11It seems you are using Client credential flow. This implies that the token will have application claims i.e. running in the context of an application. Therefore you cannot use /me endpoint here.
You can use users/id instead. Alternatively, you can use OAuth authorization code flow (where the token will have both user as well as application claims ) to leverage /me endpoint.
Follow tutorial here to generate access token accordingly.
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
Repost of https://github.com/Azure/azure-sdk-for-python/issues/6731#issuecomment-1028393257
I am testing the retry parameters on ServiceBusClient, it is not clear if/how they work.
Am I doing something wrong, do I not understand how retry works? In below I expect the message would be deliver three times in 30 seconds. Instead is delivered 10 times with about 150 milliseconds between deliveries.
...ANSWER
Answered 2022-Feb-03 at 22:13How retry_backoff_factor
is interpreted depends on the retry_mode argument. By default it is set to "exponential", set retry_mode="fixed"
for a constant retry time.
The retry mechanism in general is only relevant for errors that occur within the SDK, for example connection timeouts. You can simulate this by setting retry_total=1, retry_backoff_factor=10, retry_mode="fixed"
, turning your Internet connection off and start your code - an exception should be raised after 10 seconds. If you now change that to retry_total=3, retry_backoff_factor=10, retry_mode="fixed"
you'll see the exception in 30 seconds, within that time frame the client has tried to receive messages three times.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install azure-sdk
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