azure - 微软地址验证API

标签 azure validation postman

我正在尝试实现 Microsoft Azure 地址验证。 我使用隐式 OAuth v2 让它工作,但我想将其实现为服务。

我已添加客户端 Sercets 并尝试使用该方法,但我没有获得身份验证 token 。

我是否没有正确实现身份验证服务? 这个API可以和我们实际用户每次登录一起使用吗?

Micorsoft Azure Address Validation

[Azure app registration](/image/ck9oW.png)
[PostMan Auth](/image/pkERQ.png)
[Token Response](/image/czeQa.png)

enter image description here

enter image description here

enter image description here

感谢您的帮助。

最佳答案

我尝试在我的环境中重现相同的结果,并成功获得如下结果:

我创建了 Azure AD 应用程序并添加了 API 权限:

enter image description here

我使用以下参数生成了访问 token :

https://login.microsoftonline.com/TenantID/oauth2/v2.0/token

client_id:ClientID
client_secret:ClientSecret
scope:https://management.azure.com/.default
grant_type:client_credentials

enter image description here

为了验证地址,我使用了以下查询:

POST https://management.azure.com/providers/Microsoft.Billing/validateAddress?api-version=2019-10-01-preview

{
  "addressLine1": "55 110th Ave NE",
  "city": "bellevue",
  "region": "wa",
  "postalCode": "98004",
  "country": "us"
}

授权选项卡中,粘贴访问 token ,如下所示:

enter image description here

enter image description here

引用:

Address - Validate - REST API (Azure Billing)

关于azure - 微软地址验证API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75453105/

相关文章:

firebase - 我可以将 postman 用于在Firebase中用作函数的onCall方法吗?

azure - 在带有下划线的 RG 中创建 Azure CS 群集时出现 InvalidDomainNameLabel

java - 通过即时获取每月的第一天和最后一天

iphone - 通过objective-c从azure表生成身份验证 header

javascript - Jquery 验证所有错误仅显示在一个警报框中

JavaScript 表单验证不适用于所有 HTML 字段

javascript - 如何在 Postman 测试中更改用户名密码

azure - 使用 Azure ID : Application is not assigned to a role 进行 client_credentials 身份验证

azure - Get-AzureADApplicationPasswordCredential cmdlet 是否有效?

unit-testing - Azure 数据工厂的单元测试