File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
articles/energy-data-services Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -157,16 +157,16 @@ from msrestazure.azure_active_directory import MSIAuthentication
157
157
def main (req : func.HttpRequest) -> str :
158
158
logging.info(' Python HTTP trigger function processed a request.' )
159
159
160
- // To Authenticate using MI , we need to pass the MEDS APP_ID as the resource.
160
+ // To Authenticate using Manaded Identity , we need to pass the Microsoft Energy Data Services Application ID as the resource.
161
161
// If we want to use a user- assigned identity, we should also include the
162
- // client ID as an additional parameter.
163
- // MI using System Assigned Identity: MSIAuthentication(resource)
164
- // MI using user Assigned Identity: MSIAuthentication(client_id, resource)
162
+ // Client ID as an additional parameter.
163
+ // Managed Identity using System Assigned Identity: MSIAuthentication(resource)
164
+ // Managed Identity using user Assigned Identity: MSIAuthentication(client_id, resource)
165
165
166
166
creds = MSIAuthentication(client_id = " <client_id_of_managed_identity>”, resource=" < meds_app_id> " )
167
167
url = " https://<meds-uri>/api/entitlements/v2/groups"
168
168
payload = {}
169
- // Passing data partition id of MEDS in headers along with the token received using MI .
169
+ // Passing data partition ID of Microsoft Energy Data Services in headers along with the token received using MI .
170
170
headers = {
171
171
' data-partition-id' : ' <data partition id>' ,
172
172
' Authorization' : ' Bearer ' + creds.token[" access_token" ]
You can’t perform that action at this time.
0 commit comments