The above is not related to Microsoft Graph, rather its part of Powershell cmdlet/script that you're using and i believe its failing with WinRM. Adding Powershell team to help.
Microsoft Teams online meetings on behalf of guest users using Graph API changing ApplicationAccessPolicy issue
i am trying to create online meeting on behalf of user,so there is need to change accesspolicy .so ,
i had installed Install-Module MicrosoftTeams and connected to teams powershell Connect-MicrosoftTeams using admin credentials and tried to create new access policy.
New-CsApplicationAccessPolicy -Identity <<PolicyName>> -AppIds <<AppIds>> -Description <<Description>>
it gives error like:
Get-CsOnlineSession : Connecting to remote server api.interfaces.records.teams.microsoft.com failed with the following error message : The WinRM client cannot process the request because the
server name cannot be resolved. For more information, see the about_Remote_Troubleshooting Help topic.
At C:\Program Files\WindowsPowerShell\Modules\MicrosoftTeams\2.3.1\net472\SfBORemotePowershellModule.psm1:63 char:22
+ $remoteSession = & (Get-CsOnlineSessionCommand)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-CsOnlineSession], PSRemotingTransportException
+ FullyQualifiedErrorId : PSRemotingTransportException,Microsoft.Teams.ConfigApi.Cmdlets.GetCsOnlineSession
Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At C:\Program Files\WindowsPowerShell\Modules\MicrosoftTeams\2.3.1\net472\SfBORemotePowershellModule.psm1:22959 char:38
+ ... -Session (Get-PSImplicitRemotingSession -CommandName 'New-CsApplic ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Invoke-Command], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
4 answers
Sort by: Most helpful
-
Deva-MSFT 2,256 Reputation points Microsoft Employee
2021-05-30T17:42:34.253+00:00 -
Kartheek Raparthy 1 Reputation point
2021-06-01T00:42:41.57+00:00 Please install latest PowerShell teams module it fixes the issues. Please go through the PowerShell teams module docs. https://learn.microsoft.com/en-us/MicrosoftTeams/teams-powershell-release-notes
-
In SEU 1 Reputation point
2021-06-02T11:29:29.81+00:00 Hello @Kartheek Raparthy
I installed PS MicrosoftTeams version 2.3.1 but have the same issue. Any other suggestion? My account has MFA enabled.
Thanks -
Abdel-Rahman Awad 11 Reputation points
2021-06-03T13:08:24.973+00:00 I have the same challenge with the same error, Account I am using has MFA enabled.