问题描述
总的来说,我对 Azure 和云服务非常陌生。我正在尝试在我的应用程序中使用 azure 存储 sdk (https://github.com/Azure/azure-storage-cpp) 并尝试习惯它。我正在尝试运行测试以确保我正确构建了库。
查看自述文件,它说要填写 test_configurations.json
文件,但我不知道应该填写什么或如何获取实际应该在那里的信息。我注册了免费的 Azure 帐户并创建了一个存储帐户,但在控制台的任何地方都没有看到 client_id、tenant_id 或客户端机密。这是配置文件:
{
"target": "production","premium_target": "premium_account","blob_storage_target": "blob_storage_account","tenants": [
{
"name": "devstore","type": "devstore","connection_string": "UseDevelopmentStorage=true"
},{
"name": "production","type": "cloud","connection_string": "DefaultEndpointsProtocol=https;"
},{
"name": "premium_account",{
"name": "blob_storage_account","connection_string": "DefaultEndpointsProtocol=https;"
}
],"token_information": {
"account_name": "","tenant_id": "","client_id": "","client_secret": "","resource": "https://storage.azure.com"
}
}
如何获取我需要的 ID 和机密?
解决方法
您需要将应用程序注册为存储客户端,然后您才能获取这些详细信息
如前所述here
使用 Azure AD 授权访问存储的第一步 资源正在向 Azure AD 注册您的客户端应用程序