SRMueller
Jun 11, 2021Copper Contributor
Read/Write AzureAD Guest Self Signup via PowerShell
Setting the Guest user self-signup property via powershell is documented to be done via the Msonline module's `Set-MsolCompanySettings` cmdlet (-AllowAdHocSubscriptions) (documentation)
Now, I don't see a way to read this setting. There's Get-MsolCompanyInformation but no value for AdHocSubscriptions.
Also, the Msonline module is marked as deprecated and we should use AzureAD(-Preview) module instead.
But there I can't find the setting. It might be me just being unable to correctly search the documentation.
So my questions are:
- how can I read the setting via powershell?
- what is the "new" way to set this setting when msonline module is deprecated?
- It's there, but hidden:
Get-MsolCompanyInformation | select AllowAdHocSubscriptions
Or just | fl * it. And you can also set/query it via Graph: https://docs.microsoft.com/en-us/graph/api/resources/authorizationpolicy?view=graph-rest-beta