最近看到了这篇文章Start your journey to becoming a Microsoft 365 developer - Microsoft 365 Developer Blog,里面讲了如何申请Microsoft 365的dev tenant,以及一些学习资料的汇总。Microsoft 365是由Office 365,Azure Portal以及Power Platform这三架马车组成的一个整体,感觉要是能顺带说下如何申请azure portal以及Power Apps(Power Automate)的免费开发环境,那就更完美了。我想用我自己的经历,讲讲如何申请一个完整的M365的开发环境(特别是power automate的开发环境,我以前花了不少时间来摸索)。

   大家要是在一个比较完善的公司,可能不需要自己准备开发环境。要是在一个security policy特别严格的公司(比如要试验graph api一些权限要求非常高的api),或者Infrastructure特别糟糕的公司,如果有一个自己的dev环境能做试验,就非常有帮助,也能更好地学习最新的开发技术。

    Microsoft 365 Dev Tenant

   我们先讲一下Microsoft 365的dev tenant,大家可以去Developer Program | Microsoft 365 Dev Center这个站点申请dev tenant,里面包含了25个Microsoft 365 E5的license以及一些示例用户和示例数据(Teams,SharePoint站点,outlook)

Dev tenant每隔90天会renew一下,要是你一直用就可以一直保留这个dev tenant。如果只为了白嫖免费的Word,Excel这样的office软件,也是极好的。

 

 

 

 

 

 

 

 

 

 你申请的dev tenant默认会启用多元素认证(MFA,要你在手机上装一个Microsoft Authenticator,登入站点需要输入里面的密钥),非常麻烦,你得去azure AD里改设置。

dev tenant有一个known issue,如果你用power automate的发邮件的action会报错,说是发邮件的server侦探到很多垃圾邮件还是啥的。我感觉微软故意这样防止你白嫖。。。

 

 

 

你申请的dev tenant只能用免费的Power Automate,如果想用一些premium的action(比如http request),你还得申请Power Apps Developer Plan。

Power Apps Developer Plan

 你可以参考这篇文章Sign up for Power Apps Developer Plan - Power Apps | Microsoft Learn去申请Power apps(Power Automate)的开发环境.据说只要你一直用而且没有滥用(abuse),这个开发环境就一直不会过期。 如果登入power automate的官网,你会看见你自己的environment。

 

 

 

切换到你自己的environment,这样你可以使用一些premium的action了

 

 

你不能把你自己的dev environment里创建的flow共享给其他人,也不能用其他账号跑connetion。

Azure Portal Free Account

很多时候我们还要写代码,还要借助Azure Portal里的各种service,大家可以到Create Your Azure Free Account Today | Microsoft Azure去申请免费的azure账号。

头30天你有200美元的额度去尝试各种服务(Free subscription,要是你不花,过30天也没了),除此之外还有很多service免费12个月

 

 

 以下是2022年9月到10月的免费服务

Free services for 12 months

 
  • Azure Cosmos DB, Free Data Stored
  • Azure Cosmos DB, Free 100 RU/s
  • Storage, Files, LRS Data Stored
  • Storage, Premium Page Blob, P6 Disks
  • Storage, Standard HDD Managed Disks, LRS Snapshots
  • Storage, Standard HDD Managed Disks, Disk Operations
  • Storage, Tiered Block Blob, Hot LRS Data Stored
  • Virtual Machines, BS Series, B1s
  • Virtual Machines, BS Series Windows, B1s
  • Networking, Data Transfer Out (GB)
  • SQL Database, Single Standard, S0 DTUs
  • Storage, Files, Read Operations
  • Storage, Files, LRS Write Operations
  • Storage, Files, Protocol Operations
  • Storage, Files, List Operations
  • Storage, Tiered Block Blob, Hot Read Operations
  • Storage, Tiered Block Blob, Hot LRS Write Operations
  • Networking, Public IP Addresses, IP Address Hours
  • Virtual Machines Licenses, Red Hat Enterprise Linux, 1 vCPU VM License
  • Storage, Tiered Block Blob, LRS List and Create Container Operations
  • Cognitive Services, Custom Vision, S0 Transactions
  • Cognitive Services, Custom Vision, S0 Training
  • Cognitive Services, Custom Vision, S0 Image Storage
  • Cognitive Services, Computer Vision, S1 Transactions
  • Cognitive Services, Language Understanding, Speech to Intent
  • Cognitive Services, QnA Maker, Standard Unit
  • Cognitive Services, Face, Standard Transactions
  • Cognitive Services, Translator Text, S1 Translation Transactions
  • Cognitive Services, Text Analytics, Standard Text Records
  • Cognitive Services, Content Moderator, Standard Transactions
  • Cognitive Services, Anomaly Detector, Standard Transactions
  • Cognitive Services, Ink Recognizer, S0 Transactions
  • Cognitive Services, Personalizer, S0 Transactions
  • Load Balancer, Standard, Data Processed
  • Load Balancer, Standard, Overage LB Rules and Outbound Rules
  • Load Balancer, Standard, Included LB Rules and Outbound Rules
  • VPN Gateway, Gateway
  • Service Bus, Standard Base Unit
  • Container Registry, Standard Registry Unit
  • Storage, Tiered Block Blob, Archive LRS Data Stored
  • Storage, Tiered Block Blob, Archive Data Retrieval
  • Storage, Tiered Block Blob, Archive Read Operations
  • Media Services, Video On Demand Encoding, Standard Output Content Minute
  • Key Vault, Premium HSM
  • Azure Database for PostgreSQL, Flexible Server Backup Storage, LRS Data Stored
  • Azure Database for MySQL, Flexible Server Burstable BS Series Compute, B1MS
  • Azure Database for PostgreSQL, Flexible Server Storage, Data Stored
  • Azure Database for MySQL, Flexible Server Backup Storage, LRS Data Stored
  • Azure Database for PostgreSQL, Flexible Server Burstable BS Series Compute, B1MS
  • Azure Database for MySQL, Flexible Server Storage, Data Stored
  • Azure Applied AI Services, Azure Form Recognizer, S0 Transactions
  • Media Services, Streaming Units, Standard Unit
  • Media Services, Live Channels, Transcription Event
  • Media Services, Live Channels, Pass
 
 过了一个月之后微软会要求你把free subscription升级成“Pay as you go",也就是说你有付钱的风险,不然的话你就没法用。

 

 但是如果你就使用上述免费服务的话,每个月的账单也是0

 
 

 

 

 
 有了这三个环境,大家就有了完整的Microsoft 365的开发环境,祝大家顺利。