【Azure Developer】use @azure/arm-monitor sdk 遇见 ManagedIdentityCredential authentication failed.(status code 500)

简介: 【Azure Developer】use @azure/arm-monitor sdk 遇见 ManagedIdentityCredential authentication failed.(status code 500)

问题描述

在使用 @azure/arm-monitor sdk 创建 MonitorClient对象时候,遇见错误 ManagedIdentityCredential authentication failed.(status code 500)

CredentialUnavailableError: ERROR: AADSTS500011: The resource principal name https://management.azure.com was not found in tenant name ##############. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant.

 

问题解决

在初始化 MonitorClient 对象时,添加 credentialScopes 参数:

credentialScopes: ['https://management.chinacloudapi.cn/.default']

即可解决问题。

 

 

参考资料

MonitorClient(TokenCredential, string, MonitorClientOptionalParams) : https://learn.microsoft.com/en-us/javascript/api/@azure/arm-monitor/monitorclient?view=azure-node-latest#@azure-arm-monitor-monitorclient-constructor

MonitorClient Optional Params credentialScopes : https://learn.microsoft.com/en-us/javascript/api/%40azure/arm-monitor/monitorclientoptionalparams?view=azure-node-latest#@azure-arm-monitor-monitorclientoptionalparams-credentialscopes

 

相关文章
|
20天前
|
存储 API 开发工具
【Azure Storage Blob】如何通过.NET Azure Storage Blobs SDK获取到Blob的MD5值呢?
【Azure Storage Blob】如何通过.NET Azure Storage Blobs SDK获取到Blob的MD5值呢?
|
20天前
|
Java 开发工具
【Azure Developer】示例: 在中国区调用MSGraph SDK通过User principal name获取到User信息,如Object ID
【Azure Developer】示例: 在中国区调用MSGraph SDK通过User principal name获取到User信息,如Object ID
|
20天前
|
API 开发工具 网络架构
【Azure Developer】使用Python SDK去Azure Container Instance服务的Execute命令的疑问解释
【Azure Developer】使用Python SDK去Azure Container Instance服务的Execute命令的疑问解释
【Azure Developer】使用Python SDK去Azure Container Instance服务的Execute命令的疑问解释
|
20天前
|
开发工具 iOS开发 容器
【Azure Blob】关闭Blob 匿名访问,iOS Objective-C SDK连接Storage Account报错
【Azure Blob】关闭Blob 匿名访问,iOS Objective-C SDK连接Storage Account报错
|
20天前
|
消息中间件 开发工具
【Azure Service Bus】Service Bus SDK 抛出 ERROR c.a.c.a.i.ActiveClientTokenManager - Error is transient. Rescheduling authorization task at interval 1079000 ms.
【Azure Service Bus】Service Bus SDK 抛出 ERROR c.a.c.a.i.ActiveClientTokenManager - Error is transient. Rescheduling authorization task at interval 1079000 ms.
|
20天前
|
开发工具
【Azure Event Hub】解决Event Hub SDK出现无法识别 com.azure.core.client.traits.TokenCredentialTrait 错误
【Azure Event Hub】解决Event Hub SDK出现无法识别 com.azure.core.client.traits.TokenCredentialTrait 错误
|
4月前
|
数据处理 编译器 数据库
x64 和 arm64 处理器架构的区别
x64 和 arm64 处理器架构的区别
|
1月前
|
编解码 安全 Linux
基于arm64架构国产操作系统|Linux下的RTMP|RTSP低延时直播播放器开发探究
这段内容讲述了国产操作系统背景下,大牛直播SDK针对国产操作系统与Linux平台发布的RTMP/RTSP直播播放SDK。此SDK支持arm64架构,基于X协议输出视频,采用PulseAudio和Alsa Lib处理音频,具备实时静音、快照、缓冲时间设定等功能,并支持H.265编码格式。此外,提供了示例代码展示如何实现多实例播放器的创建与管理,包括窗口布局调整、事件监听、视频分辨率变化和实时快照回调等关键功能。这一技术实现有助于提高直播服务的稳定性和响应速度,适应国产操作系统在各行业中的应用需求。
|
12天前
ARM64架构提供的Cache操作
ARM64架构提供的Cache操作
|
25天前
|
Ubuntu Windows
ARM架构安装ubuntu系统
8月更文挑战第19天
158 0

热门文章

最新文章