Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3724bd

Browse files
committed
Documentation update
1 parent e9ae8aa commit f3724bd

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

doc/resourcemanagementauthentication.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,24 @@ Using Service Principal
1919
There is now a detailled official tutorial to describe this:
2020
https://azure.microsoft.com/en-us/documentation/articles/resource-group-create-service-principal-portal/
2121

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+
2230
Then, you can create your credentials instance:
2331

2432
.. code:: python
2533
2634
from msrestazure.azure_active_directory import ServicePrincipalCredentials
2735
2836
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'
3240
)
3341
3442

0 commit comments

Comments
 (0)