packtpublishing / azure-data-factory-cookbook Goto Github PK
View Code? Open in Web Editor NEWAzure Data Factory Cookbook, published by Packt
License: MIT License
Azure Data Factory Cookbook, published by Packt
License: MIT License
AuthorizationFailed) The client '500aefe7-2b09-4721-' with object id '500aefe7-2b09-4721-' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/write' over scope '/subscriptions/6b149-4d68-4bc9-ad-``````````/resourcegroups/DataCheck2' or the scope is invalid. If access was recently granted, please refresh your credentials.
Code: AuthorizationFailed
Message: The client '500aefe7--4721-8ba0-*******' with object id '500aefe7--4721-' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/write' over scope '/subscriptions/6b161a49-4d68--a1ad-*******/resourcegroups/DataCheck2' or the scope is invalid. If access was recently granted, please refresh your credentials.
Regarding page 16 of the book, bullet 12, I receive the below error, which appears to be an issue with the Azure API function. Was there a change to the API? Is there a workaround and should the book be updated? I have doublechecked my credentials.
AttributeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_21800/4217901441.py in
1 adf_client = DataFactoryManagementClient(credentials, subscription_id)
2 df_resource = Factory(location='eastus')
----> 3 df = adf_client.factories.create_or_update(rg_name, df_name, df_resource)
4 print_item(df)
5 while df.provisioning_state != 'Succeeded':
~\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\mgmt\datafactory\operations_factories_operations.py in create_or_update(self, resource_group_name, factory_name, factory, if_match, **kwargs)
305 body_content_kwargs['content'] = body_content
306 request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
--> 307 pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
308 response = pipeline_response.http_response
309
~\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\core\pipeline_base.py in run(self, request, **kwargs)
209 else _TransportRunner(self._transport)
210 )
--> 211 return first_node.send(pipeline_request) # type: ignore
~\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\core\pipeline_base.py in send(self, request)
69 _await_result(self._policy.on_request, request)
70 try:
---> 71 response = self.next.send(request)
72 except Exception: # pylint: disable=broad-except
73 if not _await_result(self._policy.on_exception, request):
~\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\core\pipeline_base.py in send(self, request)
69 _await_result(self._policy.on_request, request)
70 try:
---> 71 response = self.next.send(request)
72 except Exception: # pylint: disable=broad-except
73 if not _await_result(self._policy.on_exception, request):
~\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\core\pipeline_base.py in send(self, request)
69 _await_result(self._policy.on_request, request)
70 try:
---> 71 response = self.next.send(request)
72 except Exception: # pylint: disable=broad-except
73 if not _await_result(self._policy.on_exception, request):
~\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\core\pipeline_base.py in send(self, request)
69 _await_result(self._policy.on_request, request)
70 try:
---> 71 response = self.next.send(request)
72 except Exception: # pylint: disable=broad-except
73 if not _await_result(self._policy.on_exception, request):
~\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\core\pipeline_base.py in send(self, request)
69 _await_result(self._policy.on_request, request)
70 try:
---> 71 response = self.next.send(request)
72 except Exception: # pylint: disable=broad-except
73 if not _await_result(self._policy.on_exception, request):
~\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\mgmt\core\policies_base.py in send(self, request)
45 # type: (PipelineRequest[HTTPRequestType], Any) -> PipelineResponse[HTTPRequestType, HTTPResponseType]
46 http_request = request.http_request
---> 47 response = self.next.send(request)
48 if response.http_response.status_code == 409:
49 rp_name = self._check_rp_not_registered_err(response)
~\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\core\pipeline\policies_redirect.py in send(self, request)
156 redirect_settings = self.configure_redirects(request.context.options)
157 while retryable:
--> 158 response = self.next.send(request)
159 redirect_location = self.get_redirect_location(response)
160 if redirect_location and redirect_settings['allow']:
~\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\core\pipeline\policies_retry.py in send(self, request)
443 start_time = time.time()
444 self._configure_timeout(request, absolute_timeout, is_response_error)
--> 445 response = self.next.send(request)
446 if self.is_retry(retry_settings, response):
447 retry_active = self.increment(retry_settings, response=response)
~\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\core\pipeline\policies_authentication.py in send(self, request)
115 :type request: ~azure.core.pipeline.PipelineRequest
116 """
--> 117 self.on_request(request)
118 try:
119 response = self.next.send(request)
~\AppData\Local\Programs\Python\Python39\lib\site-packages\azure\core\pipeline\policies_authentication.py in on_request(self, request)
92
93 if self._token is None or self._need_new_token:
---> 94 self._token = self._credential.get_token(*self._scopes)
95 self._update_headers(request.http_request.headers, self._token.token)
96
AttributeError: 'CredentialWrapper' object has no attribute 'get_token'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.