@@ -38,6 +38,7 @@ def __init__(self, base_url=None, creds=None):
38
38
self ._all_host_types_locations = None
39
39
self ._locations = None
40
40
self ._suppress_fedauth_redirect = True
41
+ self ._force_msa_pass_through = True
41
42
self .normalized_url = VssClient ._normalize_url (base_url )
42
43
43
44
def add_user_agent (self , user_agent ):
@@ -88,6 +89,8 @@ def _send(self, http_method, location_id, version, route_values=None,
88
89
headers [key ] = self .config .additional_headers [key ]
89
90
if self ._suppress_fedauth_redirect :
90
91
headers ['X-TFS-FedAuthRedirect' ] = 'Suppress'
92
+ if self ._force_msa_pass_through :
93
+ headers ['X-VSS-ForceMsaPassThrough' ] = 'true'
91
94
if VssClient ._session_header_key in VssClient ._session_data and VssClient ._session_header_key not in headers :
92
95
headers [VssClient ._session_header_key ] = VssClient ._session_data [VssClient ._session_header_key ]
93
96
response = self ._send_request (request = request , headers = headers , content = content )
@@ -173,6 +176,8 @@ def _get_resource_locations(self, all_host_types):
173
176
headers = {'Accept' : 'application/json' }
174
177
if self ._suppress_fedauth_redirect :
175
178
headers ['X-TFS-FedAuthRedirect' ] = 'Suppress'
179
+ if self ._force_msa_pass_through :
180
+ headers ['X-VSS-ForceMsaPassThrough' ] = 'true'
176
181
response = self ._send_request (request , headers = headers )
177
182
wrapper = self ._base_deserialize ('VssJsonCollectionWrapper' , response )
178
183
if wrapper is None :
0 commit comments