[09:51:16][Add-ExchangePermsToSPN.ps1] Exchange.ManageAsApp roll applied to application ExOapponly2021. To complete setup go to your application in the Azure portal and Grant Admin Consent.
WARNING: [09:51:18][Add-ExchangePermsToSPN.ps1] Cannot convert 'System.Object[]' to the type 'System.String' required
by parameter 'ObjectId'. Specified method is not supported.
Thus step 5 "Select 'API Permissions' to verify that 'Exchange.ManageAsApp' has been added successfully." fails for obvious reasons. Should this really be a warning and not an outright error instead?
WARNING: Upcoming breaking changes in the cmdlet 'Get-AzRoleAssignment' :
This cmdlet will use Microsoft Graph in Az 7.x and later.
Visit https://go.microsoft.com/fwlink/?linkid=2174792 for migration guide and breaking changes.
Note : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other
information on breaking changes in Azure PowerShell.
WARNING: Upcoming breaking changes in the cmdlet 'New-AzRoleAssignment' :
This cmdlet will use Microsoft Graph in Az 7.x and later.
Visit https://go.microsoft.com/fwlink/?linkid=2174792 for migration guide and breaking changes.
Note : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other
information on breaking changes in Azure PowerShell.
WARNING: [09:51:15][Add-RoleToSPN] Failed to: Applying role assignment: Adding Contributor role to SPN | Object
reference not set to an instance of an object.
Because I have a dev tenant this wasn't an issue, but not supporting MFA login also reduces the viability of the PS.