You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add environment variables foryour **HOST NAME** and **Primary** access key. Use these variables from your code instead of including the sensitive information directlyin your code.
@@ -125,11 +127,11 @@ Create a Python script to that uses either Microsoft Entra ID or access keys to
125
127
126
128
### Create a Python script using reauthentication
127
129
128
-
Microsoft Entra ID access tokens have limited lifespans, [averaging 75 minutes](/entra/identity-platform/configurable-token-lifetimes#token-lifetime-policies-for-access-saml-and-id-tokens). In order to maintain a connection to your cache, you need to refresh the token. This example demonstrates how to do this using Python.
130
+
Microsoft Entra ID access tokens have limited lifespans, [averaging 75 minutes](/entra/identity-platform/configurable-token-lifetimes#token-lifetime-policies-for-access-saml-and-id-tokens). In order to maintain a connection to your cache, you need to refresh the token. This example demonstrates how to do this using Python.
129
131
130
132
1. Create a new text file, add the following script. Then, save the fileas`PythonApplication2.py`.
131
133
132
-
1. Replace `<Your Host Name>`with the value from your Azure Managed Redis (preview) instance. Your host name is of the form `<DNS name>.<region>.redis.azure.net`.
134
+
1. Replace `<Your Host Name>`with the value from your Azure Managed Redis (preview) instance. Your host name is of the form `<DNS name>.<region>.redis.azure.net`.
133
135
134
136
1. Replace `<Your Username>`with the values from your Microsoft Entra ID user.
135
137
@@ -332,11 +334,11 @@ Create a Python script to that uses either Microsoft Entra ID or access keys to
332
334
333
335
### Create a Python script using reauthentication
334
336
335
-
Microsoft Entra ID access tokens have limited lifespans, [averaging 75 minutes](/entra/identity-platform/configurable-token-lifetimes#token-lifetime-policies-for-access-saml-and-id-tokens). In order to maintain a connection to your cache, you need to refresh the token. This example demonstrates how to do this using Python.
337
+
Microsoft Entra ID access tokens have limited lifespans, [averaging 75 minutes](/entra/identity-platform/configurable-token-lifetimes#token-lifetime-policies-for-access-saml-and-id-tokens). In order to maintain a connection to your cache, you need to refresh the token. This example demonstrates how to do this using Python.
336
338
337
339
1. Create a new text file, add the following script. Then, save the fileas`PythonApplication2.py`.
338
340
339
-
1. Replace `<Your Host Name>`with the value from your Azure Cache for Redis instance. Your host name is of the form `<DNS name>.redis.cache.windows.net`.
341
+
1. Replace `<Your Host Name>`with the value from your Azure Cache for Redis instance. Your host name is of the form `<DNS name>.redis.cache.windows.net`.
340
342
341
343
1. Replace `<Your Username>`with the values from your Microsoft Entra ID user.
342
344
@@ -413,6 +415,8 @@ Microsoft Entra ID access tokens have limited lifespans, [averaging 75 minutes](
0 commit comments