简体   繁体   English

Azure 市场 Sendgrid 用户名

[英]Azure market place Sendgrid username

The Microsoft documentation How to Send Email Using SendGrid with Azure says that once an account has been set up you can see the SendGrid credentials by clicking on the key icon. Microsoft 文档如何使用 SendGrid 和 Azure 发送电子邮件说,一旦设置了帐户,您就可以通过单击钥匙图标来查看 SendGrid 凭据。 This seems to have disappeared from the Azure portal.这似乎已经从 Azure 门户中消失了。 How can I find the SendGrid username for this service.如何找到此服务的 SendGrid 用户名。 I believe it is in the format of azure***@azure.com (see change username for ...?我相信它是 azure***@azure.com 的格式(请参阅更改用户名...?

I had a similar issue and took a guess to see if Azure CLI would give it to me and it does.我遇到了类似的问题,并猜测 Azure CLI 是否会提供给我,结果确实如此。

In the portal use the cloud shell option, this icon top right:在门户中使用云外壳选项,这个图标右上角:

在此处输入图片说明

Change the shell type from PowerShell to Bash, if you have multiple accounts then you will need to select the right account将 shell 类型从 PowerShell 更改为 Bash,如果您有多个帐户,则需要选择正确的帐户

az account show

If not in the right account ( UPDATE - if you have permissions to access all accounts then you won't need to switch accounts so you can skip to the final bit)如果不在正确的帐户中(更新- 如果您有权访问所有帐户,则无需切换帐户,因此您可以跳到最后一点)

az account list
az account set -s <id of relevant subscription>

Then on the SendGrid resource blade go to Properties and copy the Resource ID and then run然后在 SendGrid 资源边栏选项卡上转到属性并复制资源 ID,然后运行

az resource show --ids /subscriptions/xxxxxx/resourceGroups/xxxxx/providers/Sendgrid.Email/accounts/xxxxx

using your resource id obviously and in the output you will see the SendGrid username显然使用您的资源 ID,在输出中您将看到 SendGrid 用户名

It sounds like you forgot the username and password of your SendGrid account, so you can not reset your password via the button Reset Password on Azure portal, as the figure below.听起来您忘记了 SendGrid 帐户的用户名和密码,因此您无法通过 Azure 门户上的Reset Password按钮Reset Password ,如下图。

在此处输入图片说明

On Azure portal, there seems to be username and email registered when account created in the tab Export template , as the figure below.在Azure门户上,在Export template选项卡中创建帐户时似乎有注册的用户名和电子邮件,如下图。

在此处输入图片说明

You can try to use it to reset password, and then to manage your API keys in SendGrid portal.您可以尝试使用它来重置密码,然后在 SendGrid 门户中管理您的 API 密钥。

The one provided by Simon should answer your question rightly.西蒙提供的人应该正确回答你的问题。 To supplement his answer, we can also just copy ResourceID section from properties like highlighted in yellow marker:为了补充他的回答,我们还可以从黄色标记突出显示的属性中复制 ResourceID 部分: 在 Azure 管理门户中复制 ResourceID 部分

and run the below command in our local command prompt once we have installed Azure CLI in our local system:在本地系统中安装 Azure CLI 后,在本地命令提示符中运行以下命令:

az resource show --ids <Copied ResourceID>

which translates to这意味着

az resource show --ids/subscriptions/xxxxxx/resourceGroups/xxxxx/providers/Sendgrid.Email/accounts/xxxxx

Advantage : This does not require us to try Bash Script in the Azure Cloud Shell (which requires configuration of an explicit storage account)优点:这不需要我们在 Azure Cloud Shell 中尝试 Bash Script(需要配置显式存储帐户)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM