21 Jun 2023
	
		
		01:50 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 - last edited on 
    
	
		
		
		22 Jun 2023
	
		
		08:04 AM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 by 
				
		
		
			MaciejNeumann
		
		
		
		
		
		
		
		
	
			
		
Hi,
I tried to export existing configuration but all files are empty and all requests returned 401
http.log :
2023/06/21 14:34:34 401 Unauthorized {"error":{"code":401,"message":"Authentication required","details":{"errorRef":"1a5f44d6-3777-49f1-b236-3290d06c43e9"}}}
2023/06/21 14:34:34 GET https://{environmentid}.apps.dynatrace.com/api/v2/settings/objects?schemaIds=builtin%3Aproblem.notifications&fields=objectId%2Cvalue%2Cscope%2CschemaVersion&pageSize=100
I tried to create tokens multiple time, always have same issue. 
Token works to create configuration.
Token has 22 Scopes (as described)
Kind regards
Steffen
 
Solved! Go to Solution.
21 Jun 2023 04:18 PM
single line fixed the issue but I really don't know why
DYNATRACE_API_TOKEN=xxxTOKENxxx DYNATRACE_ENV_URL="https://{environmentid}.live.dynatrace.com" .terraform/providers/registry.terraform.io/dynatrace-oss/dynatrace/1.33.0/darwin_arm64/terraform-provider-dynatrace_v1.33.0 -export
before I exported credentials and url...