File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -19,16 +19,24 @@ Using Service Principal
19
19
There is now a detailled official tutorial to describe this:
20
20
https://azure.microsoft.com/en-us/documentation/articles/resource-group-create-service-principal-portal/
21
21
22
+ At this point, you must have:
23
+
24
+ * Your client id. Found in the "client id" box in the "Configure" page of your application in the Azure portal
25
+ * Your secret key. Generated when you have created the application. You cannot show the key after creation.
26
+ If you've lost the current key, you must create a new one in the "Configure" page of your application.
27
+ * You AD tenant id. It's an UUID (e.g. ABCDEFGH-1234-ABCD-1234-ABCDEFGHIJKL) which point to the AD containing your application.
28
+ You will found it in the URL when you are in the Azure portal in your AD, or in the "view endpoints" in any of the given url.
29
+
22
30
Then, you can create your credentials instance:
23
31
24
32
.. code :: python
25
33
26
34
from msrestazure.azure_active_directory import ServicePrincipalCredentials
27
35
28
36
credentials = ServicePrincipalCredentials(
29
- ' https://login.microsoftonline.com/ ABCDEFGH-1234-ABCD-1234-ABCDEFGHIJKL/ ' , # Your OAuth 2.0 Token Endpoint for this app
30
- ' ABCDEFGH-1234-ABCD-1234-ABCDEFGHIJKL ' , # Your client id
31
- ' generatedkey ' , # Your authentication key
37
+ client_id = ' ABCDEFGH-1234-ABCD-1234-ABCDEFGHIJKL' ,
38
+ secret = ' XXXXXXXXXXXXXXXXXXXXXXXX ' ,
39
+ tenant = ' ABCDEFGH-1234-ABCD-1234-ABCDEFGHIJKL '
32
40
)
33
41
34
42
You can’t perform that action at this time.
0 commit comments