Forum Discussion

Gurkan_Illeez's avatar
Gurkan_Illeez
Copper Contributor
Mar 10, 2022

(Ms Teams) Grant-CsTeamsCallingPolicy command has some problem after latest release

 

Grant-CsTeamsCallingPolicy -PolicyName Allowcalling -Identity Email address removed
Microsoft.Teams.ConfigAPI.Cmdlets.internal\Grant-CsUserPolicy : User does not exist

 

We have tried to run command above but it always fails for new users. Actually as you can see, it throws User does not exist. Old users or predefined users are working fine. We have tried with normal account and developer account. It didn't change anything.

 

This command was working until latest release and we didn't encounter any problem. Our script was working fine.

 

Msteams module version : 3.0 , 4.0 are tested

 

 

6 Replies

    • Marco Arienti's avatar
      Marco Arienti
      Copper Contributor

      Petri-X I have a similar issue regarding Resource Account created directly in TAC.

      In the past I was able to configure it as "TeamsOnly" running command Grant-CsTeamsUpgradePolicy -PolicyName UpgradeToTeams -Identity <upn>, but now I receive an error like this:

      Microsoft.Teams.ConfigAPI.Cmdlets.internal\Grant-CsUserPolicy : User can't be granted this policy
      At XXXXXX\WindowsPowerShell\Modules\MicrosoftTeams\XXX\net472\custom\PsExt\Grant-CsUserOrTenantPolicy.ps1:61 char:13
      + Microsoft.Teams.ConfigAPI.Cmdlets.internal\Grant-CsUserPo ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : InvalidOperation: ({ Identity = aa...ntUserRequest }:<>f__AnonymousType50`3) [Grant-CsUserPolicy_GrantExpanded], Exception
      + FullyQualifiedErrorId : ClientError,Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Cmdlets.GrantCsUserPolicy_GrantExpanded

       

      I already tested same command with different module version but with same result. I also tried using Identity instead of UPN but KO. 

      • Marco Arienti's avatar
        Marco Arienti
        Copper Contributor
        just an update, with module 4.0 and 4.1 is not working. Now I tested again with version 2.3.1 and is working.
        Any Idea?
  • Petri-X's avatar
    Petri-X
    Bronze Contributor

    Oh ! I though I was the only one having this 🙂

    But I also found that those users whom I'm unable to control do have $null (or "{}") for FeatureTypes value. Do you have the same? In that sense the error is correct. Question is, how we could have users in policies if they are not enabled for Teams.

  • Marco Arienti's avatar
    Marco Arienti
    Copper Contributor
    Hello, I have the same issue.
    I also tried with module version 2.x with the same result.
    2 weeks ago with module version 3.x was working.