我如何获得Aure'ClientSecret'与C#连接 [英] How can I get the Aure 'ClientSecret' to connect with C#

查看:83
本文介绍了我如何获得Aure'ClientSecret'与C#连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在开发C#应用程序,我想连接到Azure,但是我可以找到ClientSecret令牌,有人可以告诉我在哪里可以找到吗?

I've been development a C# application and I want to connect to Azure but I can find the ClientSecret token, can anybody tell me where can I look for?

推荐答案

你好

我认为您正在谈论与DocumentClient一起使用以连接到CosmosDB的访问密钥,如果您有不同的选择,则可以使用Azure-CLI或Azure-PowerShell或直接导航至您的CosmosDB帐户来获取访问密钥然后去 关键部分:

I think you are talking about the access key to use with DocumentClient to connect to CosmosDB, if so you have different options, you can get your access key using Azure-CLI or Azure-PowerShell or simply by navigating to your CosmosDB account and go to the keys section: 

否则,如果您具有Azure-CLI,则可以使用以下命令:

otherwise, if you have Azure-CLI you can use this command:

az cosmosdb list-keys --name "mycosmosdbaccount" --resourcegroup "myresourcegroup"

以下是文档的链接: a 另外,这是一个Powershell脚本示例,用于获取CosmosDb帐户密钥:

also here is a sample of a Powershell script to get the CosmosDb account keys:

# Set the Azure resource group name and location


resourceGroupName ="myResourceGroup"
resourceGroupName = "myResourceGroup"


resourceGroupLocation = 美国中南部" #创建资源组 New-AzureRmResourceGroup-名称
resourceGroupLocation = "South Central US" # Create the resource group New-AzureRmResourceGroup -Name


这篇关于我如何获得Aure'ClientSecret'与C#连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆