Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    vigouredelaruse
    @vigouredelaruse
    This message was deleted
    274188A
    @274188A
    Looking to deploy to .NET 5 but the WithNetFrameworkVersion type only seems to know about .net 4.6 or .net 3.0 - anything I can do to get around this?
    johan-v-r
    @johan-v-r

    Hi all! I'm following this AppAuthentication to Azure.Identity Migration Guidance where I've updated from

    var accessToken = await new AzureServiceTokenProvider().GetAccessTokenAsync("https://database.windows.net");

    to

    var accessToken = await new DefaultAzureCredential().GetTokenAsync(new TokenRequestContext());

    However I get an error with the new token of "Login failed for user '<token-identified principal>'" Any ideas here?
    My environment has full access, VS is signed in, it works 100% with the old token... Breaking changes or what??

    Joel Verhagen
    @joelverhagen
    Hey folks, is it possible to get a pre-release build of the client NuGet packages? For example, if a change was recently committed for Azure.Data.Tables, is there some AzDO feed where I can get a build? I am blocked by a bug that's fixed in the master branch.
    NeilMacMullen
    @NeilMacMullen
    Hmm - seems like a lot of questions and not many answers here :-( Anyway does anyone have a pointer to plans/roadmap for .Net5 support? It kind of feels like this ought to be a big topic but I can't find anything relevant. I'm hoping to port a "classic" Cloud Service to .Net5 ...
    Egil Hansen
    @egil
    Hi there, if I want to create an azure subscription on a tenet, configure it and various services inside it, all from C#, what is the best approach for doing so?
    It seems to me there are quite a few different SDKs, both C# and REST based, available.
    thepenguinmaster
    @thepenguinmaster
    @joelverhagen your best bet is to clone the repo and build yourself. I have been doing that for some time now for the same reasons, it also allows me to inject my own modifications :)

    @egil they did create endpoints for creating subscriptions, but it also requires a business agreement with Microsoft (legal and business stuff like MCA). Once the 'business people' cleared it, it was green fields for development and works pretty good. Configuring services is just deploying ARM templates basically.

    I use the Azure SDK's that I extend externally.

    Christopher Scott
    @christothes
    @joelverhagen For getting the latest bits on NuGet, there is a daily build feed for each of the client packages. For example, here is the current daily build for Azure.Data.Tables
    https://dev.azure.com/azure-sdk/public/_packaging?_a=package&feed=azure-sdk-for-net&package=Azure.Data.Tables&protocolType=NuGet&version=12.0.0-alpha.20210511.1&view=overview
    @egil Check out this package for interacting with the Azure Resource Manager https://www.nuget.org/packages/Azure.ResourceManager.Resources/1.0.0-preview.2
    Christopher Scott
    @christothes
    @NeilMacMullen The .NET Azure SDKs already support .NET5
    Egil Hansen
    @egil
    @thepenguinmaster / @christothes ok, thanks. I did find this - https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/programmatically-create-subscription-enterprise-agreement - and the REST variant doesnt look to hard to work with via a standard HttpClient. Any reason not to just use that instead of the preview/beta .net sdks?
    Egil Hansen
    @egil
    Maybe I should share a bit about my use case. Im building a API that can be called from ServiceNow, that should create a new subscription, configure it according to our company policies, add standard things like keyvault. That way, users can order a subscription at our company tenet via ServiceNow.
    thepenguinmaster
    @thepenguinmaster

    @egil Interesting use case! Generally the system I designed will provision a few thousand subscriptions a day/week and deploy whatever configuration is required, so I get a lot of use out of this stuff. For your setup, you will want to expect some delay in the customer request, and the finished process. If it does not need to be instant, and can wait 5 mins, then it shouldn't be a problem. You just want to let things settle out a bit and make sure roles and policies are in effect. Rate limits can also sometimes be an issue if your using the EA api, but that has been deprecated.

    To get started, assuming you have a billing account (MS will give it to you with your MCA agreement) or an Enrollment Account (with an EA Agreement), you will just pass that in as a parameter using this:

    using Microsoft.Azure.Management.Subscription;
     using (var _subscriptionClient = new SubscriptionClient(Credentials, _httpClient, false)){
         await _subscriptionClient.Alias.CreateAsync(name, new PutAliasRequest
                    {
                        Properties = new PutAliasRequestProperties
                        {
                            DisplayName = name,
                            Workload = workload,
                            BillingScope = scope,
                        }
                    }
    }

    Just find and pull the nuget package. I build mine from the git repo directly.

    About billing accounts (you are going to want this stuff):
    https://docs.microsoft.com/en-us/azure/cost-management-billing/understand/mca-overview#your-billing-account

    Once thats done, you should get a response form CreateAsync that has the subscription ID and some details in it. Pass that to the next part of your code (I recommend some persistent storage like a db to hold the new subscription so you don't have to find it later) then just deploy your resources.

    If you need more details then maybe you can DM me by clicking my avatar and sending a private message.

    Egil Hansen
    @egil
    Thanks @thepenguinmaster, yes, there can be a delay. We actually have a version of this service that does all we need through powershell scripts, however, error handling is hard with powershell, so sometimes creating subscriptions fails, etc.,
    The subscription client code you shared here looks like it is just a very thing wrapper around the REST api (https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/programmatically-create-subscription-enterprise-agreement?tabs=rest#create-subscriptions-under-a-specific-enrollment-account), it even uses an HttpClient.
    NeilMacMullen
    @NeilMacMullen
    @christothes It may be true that the SDK "supports" .Net 5 but it is also the case that the support is far from complete. For example, "Cloud Services" will apparently never be supported on .Net5, Function support is only partial atm etc. What I'm looking for as an Azure user is some kind of overall roadmap - both for .Net5 and .Net 6. We've just spent a very frustrating couple of weeks trying to migrate as much as possible of our codebase to .Net5 and it's been far from pleasant :-(
    Christopher Scott
    @christothes
    @NeilMacMullen Which specific client SDK packages were you having trouble with?
    NeilMacMullen
    @NeilMacMullen
    @christothes I suspect you're looking for a list of particular defects against the SDK but that's not really what I'm talking about. Here are some of the things I wish we had known when I wrote that original post:
    • "Cloud Services" simply won't support .Net5 and probably never will. You may think you're being clever by targeting .NetStandard for all your shared libraries but eventually you'll hit a runtime DLL load error because Microsoft.WindowsAzure.ServiceRuntime is ancient and relies on obsolete APIs.
    • Function support is incomplete. (TBF the functions team is quite open about the fact they are behind the curve.) You can't yet debug .Net5 functions locally. You will probably have to do some manual fiddling with the generated package.zip to get them to deploy properly. AppInsights integration seems incomplete (e.g. the Application Map/dependency tracking) doesn't work.
    • WebApps mostly seem to "just work" when ported (yay!)though there is an issue where the AppInsights blade is grayed out after a couple of deployments (possibly just general Portal flakiness)
      AFAIK there is no one place one can go to get this kind of high level overview which is unfortunate since I suspect a lot of Azure users are independently discovering these issues as they try to migrate.
    Christopher Scott
    @christothes
    @NeilMacMullen sorry to hear you are having trouble with these Azure services. This room pertains to the client SDKs (azure-sdk-for-net) which is why I was focusing in on that aspect. Would you like some info on where you can file this feedback with the appropriate teams that own these services?
    NeilMacMullen
    @NeilMacMullen
    @christothes thanks - that would be useful. My main bugbear though is that there is no obvious starting point to get this kind of "overall" information. The move to open-source is great but has led to a plethora of individual repos with no clear relationship or heirarchy. It doesn't seem unreasonable to think that the "azure sdk for net" would be the the main "umbrella" repo for all things Azure but I'm guessing that is not the case :-) I would have hoped by now that someone at Microsoft would have put together a "what Azure customers need to know about migrating to .Net5" resource but I can see how it's the kind of thing with no clear owner in a large organisation with lots of distributed teams.
    adilkhanSL2021
    @adilkhanSL2021
    hi, i am .Net developer. I need some help of fetching roleassignment list using sdk.
    how can i implement AuthorizationManagementClient class of sdk please help
    adilkhanSL2021
    @adilkhanSL2021
    how can initialize SubscriptionCloudCredentials
    Christopher Scott
    @christothes

    Hi @NeilMacMullen - sorry for the delay in my response.

    We have an Azure/.NET (all language) vTeam working together to flesh out the guidance for adopting new versions, migrating to new versions, and a version roadmap.

    Are you open to meeting with some of the team to discuss some of your feedback?

    hksun
    @hksun
    Hello all, I'm trying to update a firewall policy rule group with a new firewall policy nat rule that I created programmatically. I'm referring to this function documented here: https://docs.microsoft.com/en-us/dotnet/api/azure.resourcemanager.network.firewallpolicyrulegroupsoperations.startcreateorupdate?view=azure-dotnet-preview My question is what is meant by "Parameters supplied to the create or update FirewallPolicyRuleGroup operation"? I was just putting in a FirewallPolicyRuleGroup object but parameters implies plural.
    NeilMacMullen
    @NeilMacMullen
    @christothes - sorry also missed you reply. The SDK team just reached out so hopefully will talk with them :-)
    Christopher Scott
    @christothes
    Great!
    Taras Vozniuk
    @ambientlight
    Is there a way to get some feedback on Azure/autorest.csharp#1375 and Azure/autorest.csharp#1376 ?
    Alexander Sher
    @AlexanderSher
    Fixes are in PR right now: Azure/autorest.csharp#1417
    apraovjr
    @apraovjr
    I want to run the sdk event hub scenario tests as part of azure devops pipeline, how do i set the environment variable for connection string in pipeline since its environment setting variable
    Stuart Bale
    @stuartbale
    Hello - I'm a newbie here. I am looking for a code sample for configuring Azure.Storage.Queues in an ASP.Net web app (using .Net Core 5) so that the QueueClient is injected via DI. Can anyone help point me in the right direction please?
    Scott Addie
    @scottaddie
    @stuartbale See the DI guidance available at https://docs.microsoft.com/dotnet/azure/sdk/dependency-injection, and let me know what questions you have.
    Stuart Bale
    @stuartbale

    Hey @scottaddie - thanks for the quick response. I am specifically looking for an example of how to configure the Queue. The example in the link provided only shows Blob. I have got this far in Startup.cs:

                services.AddAzureClients(builder => {
                    // Use the environment credential by default
                    builder.UseCredential(new DefaultAzureCredential());
    
                    builder.AddQueueServiceClient(Configuration.GetSection("StorageConnectionString"));
                });

    and this is my class:

        public class AzureQueueService : IQueueService
        {
            private readonly QueueServiceClient _queueServiceClient;
    
            public AzureQueueService(QueueServiceClient queueServiceClient)
            {
                this._queueServiceClient = queueServiceClient;
            }
    }

    I have just now started testing, so will post here with the outcome.

    Stuart Bale
    @stuartbale
    WOOHOO - success. The above code is surprisingly simple. I had to send the message as base64 encoded string, but aside from that it's working how I want.
    Is the UseCredential in Startup.cs needed?
    Stuart Bale
    @stuartbale
    I've changed the configuration to this:
    ...
                    builder.AddQueueServiceClient(Configuration.GetSection("StorageConnectionString"))
                    .ConfigureOptions(c => c.MessageEncoding = Azure.Storage.Queues.QueueMessageEncoding.Base64);
    ...
    Johnata Davi
    @JohnataDavi
    Hi guys, I would like to know how to update the public ip of an azure vm. Can someone help me?
    Noah Wöhler
    @NoahWoehler_twitter
    Hi, can I post a call for participants in an interview study on open source projects here? If any mod wants more details via DM first, then I'm happy to oblige 🙂
    Alex Ghiondea
    @AlexGhiondea
    @NoahWoehler_twitter please reach out to me and @scottaddie 🙂.
    Sean J Mackey
    @mack0196
    Microsoft.Azure.ServiceBus NuGet showing deprecated in VS Package Manager.
    However the Azure.Messaging.ServiceBus says the deprecation is not official.
    Can anyone clarify if Microsoft.Azure.ServiceBus deprecation means the library will fall out of service or support?
    Alex Ghiondea
    @AlexGhiondea
    Sean -- as the message on Nuget says, the Microsoft.Azure.ServiceBus will continue to receive critical bug fixes but we strongly encourage you to upgrade.
    1 reply
    MTokarev
    @MTokarev
    Hi everyone, might be it is not right place to ask, but might be I lucky :) Do anyone know if Azure SDK has any documentation aroung port requirements for clients behind firewall?
    Christopher Scott
    @christothes
    MTokarev
    @MTokarev
    Hi, thanks for reply, but the question was more about ports and ip\domain ranges and not related to the proxy.
    Alexander Trauzzi
    @atrauzzi
    Hey, would anyone happen to know why this version on maven central is 404ing?
    https://mvnrepository.com/artifact/com.azure/azure-storage-blob/12.6.1
    AmitBhatnagar24
    @AmitBhatnagar24
    When trying to update a number of different resources via ResourceOperations.StartUpdateByIdAsync(...) , one of the parameters is the API version. How do I know what API version to use for a particular resource??
    Julius Liu
    @juliusl
    Does anyone happen to know if you need to call HasData before accessing Data on Resources with the new sdk
    Ex:
            VirtualNetwork vnet = await client.GetVirtualNetwork(vnetId).GetAsync().ConfigureAwait(false);
                if (vnet == null)
                {
                    throw new ArgumentException($"VNET '{vnetId}' does not exist.");
                }
    
            if (!vnet.HasData) { throw new ArgumentException("VNET does not have data"); }  //  <- Should this be before each call to .Data?
            foreach (var subnet in vnet.Data.Subnets)
                {
                    ...
                }
    Yuriy Burda
    @BurikYurik_twitter
    Hi,
    Does anyone facing an issue with the package Microsoft.Azure.Management.Cdn v"6.1.0"
    Operation CdnManagementClient.Endpoints.PurgeContentAsync(resourceGroupName, profileName, endpointName, contentPaths, cancellationToken) became return an invalid status code 'BadRequest'.
    I use General Microsoft CDN with custom domain HTTPS and Certificate management type "CDN managed".
    I saw an issue Azure/azure-powershell#9654 but it related to the PowerShell module.