使用新的azstaticwebappuserroleinvitationlink时如何创建邀请电子邮件
我的Active Directory中有几千种用户。我正在分配角色,以限制对Azure静态Web应用程序的路径访问。我们不想手动分配角色,因此我们正在创建一个将创建邀请并分配角色的PowerShell脚本。
我执行以下命令邀请并将角色分配给单个用户:
PS C:\Installers> New-AzStaticWebAppUserRoleInvitationLink -SubscriptionId <SubscriptionId> -ResourceGroupName <SecureStaticSiteResourceGroupName> -Name SecureStaticSiteName -Domain <SecureStaticSiteName>.azurestaticapps.net -Provider 'azure' -UserDetail '[email protected]' -Role 'contributor' -NumHoursToExpiration 72
这是我所获得的,
Kind Name ResourceGroupName
---- ---- -----------------
99x99999-99xx-9x99-9x99-99x9xxxx9xxx SecureStaticSiteResourceGroupName
我认为我可以使用PowerShell脚本脚本脚本脚本,但我很困惑我如何能够像一个一样生成类似的电子邮件通过角色管理用户界面创建邀请时会生成?
这是通过UI生成的原因:
https://<SecureStaticSiteName>.azurestaticapps.net/.auth/invitations/accept?provider=aad&userDetails=test%40test.com&roles=contributor&se=2022-06-15T17%3A41%3A15Z&sig=b91pyHaosUQ%2F5zlMZgux0hUiO2Soso74UYYTvAOhVjmh5byyU9VjEssBOV8cXLg%2BYVfTsqmHKtOe8SjYehza00BfuJGUFFdpQpy%2F7zcuovVP5krtHHPimzecB4Vxwfy1HHjdynGaf7hBxhJynGK6Du2827iPE3z%2BSMPJ48X7Z7V%2BDG6nDkyjjk%2FfAxT5udXzDuNi%2BXik8C%2BRoKnxi3ZlQg%3D%3D
生成的URL中的签名是使我在这里抛弃的原因。知道我如何生成它并将电子邮件发送给用户吗?
任何帮助将不胜感激。谢谢。
I have a few thousand users in my Active Directory. I'm assigning Roles to restrict path access to Azure Static Web Apps. We don't want to manually assign roles so we're creating a Powershell script that will create an invite and assign the role.
I execute the following command to invite and assign a role to a single user:
PS C:\Installers> New-AzStaticWebAppUserRoleInvitationLink -SubscriptionId <SubscriptionId> -ResourceGroupName <SecureStaticSiteResourceGroupName> -Name SecureStaticSiteName -Domain <SecureStaticSiteName>.azurestaticapps.net -Provider 'azure' -UserDetail '[email protected]' -Role 'contributor' -NumHoursToExpiration 72
Here's what I get as a result
Kind Name ResourceGroupName
---- ---- -----------------
99x99999-99xx-9x99-9x99-99x9xxxx9xxx SecureStaticSiteResourceGroupName
I thought I would be able to script the email using Powershell but I'm confused how I can generate a similar email like the one generated when creating an invite thru the Role Management User Interface?
Here's what gets generated thru the UI:
https://<SecureStaticSiteName>.azurestaticapps.net/.auth/invitations/accept?provider=aad&userDetails=test%40test.com&roles=contributor&se=2022-06-15T17%3A41%3A15Z&sig=b91pyHaosUQ%2F5zlMZgux0hUiO2Soso74UYYTvAOhVjmh5byyU9VjEssBOV8cXLg%2BYVfTsqmHKtOe8SjYehza00BfuJGUFFdpQpy%2F7zcuovVP5krtHHPimzecB4Vxwfy1HHjdynGaf7hBxhJynGK6Du2827iPE3z%2BSMPJ48X7Z7V%2BDG6nDkyjjk%2FfAxT5udXzDuNi%2BXik8C%2BRoKnxi3ZlQg%3D%3D
The signature in the generated url is what's throwing me off here. Any idea how I can generate that and send the email off to the user?
Any help is greatly appreciated. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论