| Author | 
		  Message
		 | 
		
		  | mpong | 
		  
		    
			  
				 Posted: Mon Jun 05, 2017 12:49 pm    Post subject: Rest API Get method Authorization | 
				     | 
			   
			 
		   | 
		
		
		   Disciple
 
 Joined: 22 Jan 2010 Posts: 164
  
  | 
		  
		    
			  
				I am trying to fetch the data from the share point rest api and I am able to retrieve the data thru advanced rest client but it does not work from IIB or post man.
 
 
https://temp.com/_vti_bin/listdata.svc/REFGPAccounts(1)
 
 
Method: Get
 
 
When I use the ARC it asks for the login credential and then the request goes thru. I also noticed that once I provide the logon credentials ARC creates Authorization: NTLM TlRMTVNTUAADAAA.
 
 
But i am not able to get the data by passing basic auth thru 
 
postman or IIB using the given username & password.
 
 
Typically i use the basic auth for rest apis in IIB. I am not sure why this is going thru with ARC. 
 
 
SET OutputRoot.HTTPRequestHeader."Authorization" = 'Basic '||Environment.access_token;
 
		 SET OutputRoot.HTTPRequestHeader."Content-Type"='application/json'; | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mpong | 
		  
		    
			  
				 Posted: Mon Jun 05, 2017 1:00 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Disciple
 
 Joined: 22 Jan 2010 Posts: 164
  
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mpong | 
		  
		    
			  
				 Posted: Mon Jun 05, 2017 1:11 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Disciple
 
 Joined: 22 Jan 2010 Posts: 164
  
  | 
		  
		    
			  
				i have set the broker to allow NTLM auth type
 
 
mqsichangeproperties IIB9BRK -e default -o ComIbmSocketConnectionManager -n allowedAuthTypes -v "NTLM"
 
 
After the change, I am passing the properties but still, I am getting unauthorized
 
 
	SET OutputRoot.Properties.IdentitySourceType='usernameAndPassword';
 
	SET OutputRoot.Properties.IdentitySourceToken = 'xxxx';
 
	SET OutputRoot.Properties.IdentitySourcePassword = 'yyyy';
 
	SET OutputRoot.Properties.IdentitySourceIssuedBy = 'na'; | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mpong | 
		  
		    
			  
				 Posted: Mon Jun 05, 2017 1:37 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Disciple
 
 Joined: 22 Jan 2010 Posts: 164
  
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mpong | 
		  
		    
			  
				 Posted: Wed Jun 07, 2017 10:47 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Disciple
 
 Joined: 22 Jan 2010 Posts: 164
  
  | 
		  
		    
			  
				after changing the below property and sending the username/password in the outputroot property, IIB is able to connect and get the data from sharepoint rest api. 
 
 
But it worked only on Windows not on linux  
 
 
setting the property:
 
mqsichangeproperties IBNODE -e default -o ComIbmSocketConnectionManager -n allowedAuthTypes -v "NTLM"
 
 
Setting username/Password
 
 
SET OutputRoot.Properties.IdentitySourceType='usernameAndPassword';
 
SET OutputRoot.Properties.IdentitySourceToken = 'xxxx';
 
SET OutputRoot.Properties.IdentitySourcePassword = 'yyy';
 
SET OutputRoot.Properties.IdentitySourceIssuedBy = 'na'; | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Thu Jun 08, 2017 5:00 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| mpong wrote: | 
   
  
	
 
 
But it worked only on Windows not on linux  
 
 
 | 
   
 
 
 
Well, in fairness, NTLM is a Microsoft construct. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | balu2608 | 
		  
		    
			  
				 Posted: Wed Jul 11, 2018 11:03 pm    Post subject: Ntlm authentication is not working in IIB on Unix | 
				     | 
			   
			 
		   | 
		
		
		    Apprentice
 
 Joined: 18 May 2012 Posts: 39
  
  | 
		  
		    
			  
				@mong, Even im facing the same issue , its works on Windows and it is not working in unix . 
 
Could you  suggest , how did you resolved
 
 
Thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |