Microsoft Tech Community Live:  Microsoft Teams Edition
November 09, 2021, 08:00 AM - 12:00 PM (PST)

Setting External access options via powershell

%3CLINGO-SUB%20id%3D%22lingo-sub-1667863%22%20slang%3D%22en-US%22%3ESetting%20External%20access%20options%20via%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1667863%22%20slang%3D%22en-US%22%3E%3CP%3EHi.%3C%2FP%3E%3CP%3EI'm%20trying%20to%20set%20External%20access%20for%20Teams%2C%20but%20via%20powershell.%20Specifically%20the%26nbsp%3B%3CSPAN%3E%22%3CSTRONG%3EUsers%20can%20communicate%20with%20Skype%20users%3C%2FSTRONG%3E%22%20option.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mskrgulja_0-1600162406593.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F218338i0534FEB3A545A491%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22mskrgulja_0-1600162406593.png%22%20alt%3D%22mskrgulja_0-1600162406593.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20can%20successfully%20set%20the%26nbsp%3B%20%22%3CSPAN%3EUsers%20can%20communicate%20with%20other%20Skype%20for%20Business%20and%20Teams%20users%22%2C%20but%20I%20can't%20find%20a%20solution%20for%20the%20other%20option%20(%22Users%20can%20communicate%20with%20Skype%20users%22).%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20have%20read%20numbers%20of%20blog%20postings%2C%20tutorials%20for%20the%20mentioned%20subject%20but%20it%20just%20doesn't%20work%2C%20the%20option%20won't%20switch.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMost%20mentioned%20powershell%20command%20for%20doing%20it%2C%20is%20the%20following%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3E%20%20%20%20Set-CsExternalAccessPolicy%20-EnableOutsideAccess%20%24False%0A%20%20%20%20Set-CsExternalAccessPolicy%20-EnableFederationAccess%20%24False%0A%20%20%20%20Set-CsExternalAccessPolicy%20-EnablePublicCloudAccess%20%24False%0A%20%20%20%20Set-CsExternalAccessPolicy%20-EnablePublicCloudAudioVideoAccess%20%24False%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20while%20the%20script%20changes%20the%20targeted%20parameters%20successfully%2C%20the%20switch%20in%20the%20GUI%20still%20remains%20in%20%22ON%22%20position.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20Have%20set%20the%20switch%20to%20the%20%22OFF%22%20position%20by%20hand%2C%20but%20underlying%20parameters%20quoted%20in%20code%20block%20above%2C%20haven't%20changed%20(their%20values%20retrieved%20with%20%3CSTRONG%3EGet-CsExternalAccessPolicy%3C%2FSTRONG%3E%20powershell%20command.%20So%2C%20from%20that%2C%20it%20seems%20that%20those%20commands%20aren't%20for%20that%20option%20after%20all..%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20is%20appreciated.%3C%2FP%3E%3CP%3EBr%2C%3C%2FP%3E%3CP%3EMatija%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1667863%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Eexternal%20access%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESkype%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETeams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1667972%22%20slang%3D%22en-US%22%3ERe%3A%20Setting%20External%20access%20options%20via%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1667972%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F793991%22%20target%3D%22_blank%22%3E%40mskrgulja%3C%2FA%3E%26nbsp%3BHi%2C%20you%20are%20using%20the%20correct%20switch%20as%20described%20here.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fteams-skype-interop%23using-powershell%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fteams-skype-interop%23using-powershell%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBear%20in%20mind%20that%20it%20can%20take%20several%20days%20for%20settings%20in%20Teams%20to%20take%20effect.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1668279%22%20slang%3D%22en-US%22%3ERe%3A%20Setting%20External%20access%20options%20via%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1668279%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F551905%22%20target%3D%22_blank%22%3E%40bec064%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi.%20thank%20you%20for%20your%20response.%3C%2FP%3E%3CP%3EI%20thought%20that%20it%20needed%20several%20days%20for%20settings%20to%20become%20effective%2C%20but%20I%20assumed%20that%20the%20GUI%20switch%26nbsp%3Bposition%20would%20reflect%20the%20underlying%20(powershell%20changed)%20change%20immediately%20(just%20like%20is%20the%20case%20with%20the%20first%20setting).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20will%20try%20to%20make%20the%20setting%20with%20powershell%20as%20I%20did%20before%2C%20but%20I%20will%20wait%20a%20few%20day%20to%20see%20if%20the%20changes%20will%20be%20reflected%20in%20the%20teams%20admin%20user%20interface.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBr%2C%3C%2FP%3E%3CP%3EMatija%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1668340%22%20slang%3D%22en-US%22%3ERe%3A%20Setting%20External%20access%20options%20via%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1668340%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F793991%22%20target%3D%22_blank%22%3E%40mskrgulja%3C%2FA%3E%26nbsp%3BHello%20again%2C%20I%20agree.%20The%20GUI%20should%20show%20what%20setting%20is%20set.%20Please%20verify%20the%20settings%20if%20you%20are%20on-premise%2C%20online%20or%20hybrid.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-US%2Fmicrosoftteams%2Fmanage-external-access%3FWT.mc_id%3DTeamsAdminCenterCSH%23enable-federation-between-users-in-your-organization-and-consumer-users-of-skype%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-US%2Fmicrosoftteams%2Fmanage-external-access%3FWT.mc_id%3DTeamsAdminCenterCSH%23enable-federation-between-users-in-your-organization-and-consumer-users-of-skype%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E*edit*%20just%20want%20to%20add%20that%20this%20preview%20has%20not%20been%20very%20well%20managed.%20It%20was%20rolled%20out%20and%20withdrawn%20etc.%20I'm%20doing%20some%20testing%20of%20my%20own%20and%20it%20doesn't%20look%20as%20it%20should%2C%20meaning%20the%20GUI%20says%20one%20thing%20and%20PowerShell%20another.%20So%20perhaps%20it%20isn't%20working%20properly%20now%20either.%20Please%20let%20me%20know%20if%20it%20is%20any%20difference%20when%20following%20the%20above%20prerequisites%20for%20Skype%20consumer%20federation.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1668348%22%20slang%3D%22en-US%22%3ERe%3A%20Setting%20External%20access%20options%20via%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1668348%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F551905%22%20target%3D%22_blank%22%3E%40ChristianBergstrom%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi.%3C%2FP%3E%3CP%3EI%20did%20verify%20the%20setting%20(%3CSPAN%3EAllowPublicUsers%20and%26nbsp%3BEnablePublicCloudAccess)%3C%2FSPAN%3E%2C%20and%20it's%20set%20as%20I%20left%20it%20(the%20change%20I%20made%20with%20powershell%20is%20applied%2C%20but%20not%20in%20the%20GUI).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20also%20experimented%20changing%20the%20setting%20directly%20in%20GUI%20(flipping%20the%20switch)%20but%20the%20underlying%20parameters%20(CsExternalAccessPolicy%20-EnablePublicCloudAccess)%20did%20not%20change.%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20bug%20possibility%20(since%26nbsp%3BCommunicate%20with%20Skype%20users%20is%20label%20%22in%20preview%22)%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you.%3C%2FP%3E%3CP%3EBr%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1668350%22%20slang%3D%22en-US%22%3ERe%3A%20Setting%20External%20access%20options%20via%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1668350%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F793991%22%20target%3D%22_blank%22%3E%40mskrgulja%3C%2FA%3E%26nbsp%3BSee%20my%20edit%20above%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi.

I'm trying to set External access for Teams, but via powershell. Specifically the "Users can communicate with Skype users" option.

 mskrgulja_0-1600162406593.png

I can successfully set the  "Users can communicate with other Skype for Business and Teams users", but I can't find a solution for the other option ("Users can communicate with Skype users").

 

I have read numbers of blog postings, tutorials for the mentioned subject but it just doesn't work, the option won't switch.

 

Most mentioned powershell command for doing it, is the following:

 

 

 

 

    Set-CsExternalAccessPolicy -EnableOutsideAccess $False
    Set-CsExternalAccessPolicy -EnableFederationAccess $False
    Set-CsExternalAccessPolicy -EnablePublicCloudAccess $False
    Set-CsExternalAccessPolicy -EnablePublicCloudAudioVideoAccess $False

 

 

 

 

 

And while the script changes the targeted parameters successfully, the switch in the GUI still remains in "ON" position. 

 

I Have set the switch to the "OFF" position by hand, but underlying parameters quoted in code block above, haven't changed (their values retrieved with Get-CsExternalAccessPolicy powershell command. So, from that, it seems that those commands aren't for that option after all..

 

Any help is appreciated.

Br

10 Replies

@mskrgulja Hi, you are using the correct switch as described here.

 

https://docs.microsoft.com/en-us/microsoftteams/teams-skype-interop#using-powershell

 

Bear in mind that it can take several days for settings in Teams to take effect.

@ChristianBergstrom 

Hi. thank you for your response.

I thought that it needed several days for settings to become effective, but I assumed that the GUI switch position would reflect the underlying (powershell changed) change immediately (just like is the case with the first setting).

 

I will try to make the setting with powershell as I did before, but I will wait a few day to see if the changes will be reflected in the teams admin user interface.

 

Br.

@mskrgulja Hello again, I agree. The GUI should show what setting is set. Please verify the settings if you are on-premise, online or hybrid.

 

https://docs.microsoft.com/en-US/microsoftteams/manage-external-access?WT.mc_id=TeamsAdminCenterCSH#... 

 

*edit* just want to add that this preview has not been very well managed. It was rolled out and withdrawn etc. I'm doing some testing of my own and it doesn't look as it should, meaning the GUI says one thing and PowerShell another. So perhaps it isn't working properly now either. Please let me know if it is any difference when following the above prerequisites for Skype consumer federation.

@ChristianBergstrom 

Hi.

I did verify the setting (AllowPublicUsers and EnablePublicCloudAccess), and it's set as I left it (the change I made with powershell is applied, but not in the GUI).

 

I also experimented changing the setting directly in GUI (flipping the switch) but the underlying parameters (CsExternalAccessPolicy -EnablePublicCloudAccess) did not change. 

Is there a bug possibility (since Communicate with Skype users is label "in preview")?

 

Thank you.

Br

 

@mskrgulja See my edit above :)

@ChristianBergstrom 

I'm dealing with this problem for days now.. I followed a few posts (including the one you linked). Nothing worked.

The first setting(Users can communicate with other Skype for Business and Teams users) is correctly set with powershell and reflected in GUI, just like described in the post you linked (Step 1).

 

Br

 

P.S. Thanks for bearing with me.

 

@mskrgulja No worries! I think we can assume that this preview is still experiencing issues.

@mskrgulja 

 

I'm trying to do something similar. However, how did you manage to use the Set-CsExternalAccessPolicy command? 

 

I keep getting a not found error: ObjectNotFound: (Set-CsExternalAccessPolicy:String)

 

Thanks.

 

*Updated post*

 

They mention that you can toggle it on using Teams admin center

Manage external access (federation) - Microsoft Teams | Microsoft Docs

 

But I've never actually heard of anyone succeeding in doing that so that's why we use PowerShell as also mentioned here 

Manage external access (federation) - Microsoft Teams | Microsoft Docs 

 

But that's not all steps required and the others are instead listed here

Teams and Skype interoperability - Microsoft Teams | Microsoft Docs

 

So you would have to verify these settings (1, 2, 3) and also be aware of the online vs hybrid scenario Manage external access (federation) - Microsoft Teams | Microsoft Docs

 

1. Set-CsExternalAccessPolicy
-EnablePublicCloudAccess

 

"Indicates whether the user is allowed to communicate with people who have SIP accounts with a public Internet connectivity provider such as MSN. The default value is False."

 

2. Set-CsTenantFederationConfiguration
-AllowPublicUsers

 

"When set to True (the default value) users will be potentially allowed to communicate with users who have accounts on public IM and presence providers such as Windows Live, Yahoo, and AOL. The collection of public providers that users can actually communicate with is managed by using the Set-CsTenantPublicProvider cmdlet."

 

3. Set-CsTenantPublicProvider
-Provider

 

"Indicates the public provider (or providers) that users will be allowed to communicate with. Valid values are:"

 

  • AOL
  • WindowsLive
  • Yahoo

@Ken_M5 

Hi ken.
I couldn't find a solution. We concluded that the documentation was incomplete, and possibly not supported (since the option was still in the "preview" phase) so we didn't want to waste any more time on this.

Also, the project (of which we had to change the Teams settings was part of) was abandoned so I never come back to this problem anymore.

 

Br,
Matija