Skip to content

Commit 684af70

Browse files
committed
update-date-and-author
1 parent 3bbf412 commit 684af70

File tree

1 file changed

+21
-23
lines changed

1 file changed

+21
-23
lines changed

articles/active-directory/develop/workload-identity-federation-create-trust-gcp.md

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
title: Access Azure resources from Google Cloud without credentials
33
description: Access Azure AD protected resources from a service running in Google Cloud without using secrets or certificates. Use workload identity federation to set up a trust relationship between an app in Azure AD and an identity in Google Cloud. The workload running in Google Cloud can get an access token from Microsoft identity platform and access Azure AD protected resources.
44
services: active-directory
5-
author: rwike77
5+
author: OwenRichards1
66
manager: CelesteDG
77

88
ms.service: active-directory
99
ms.subservice: develop
1010
ms.topic: how-to
1111
ms.workload: identity
12-
ms.date: 08/07/2022
13-
ms.author: ryanwi
12+
ms.date: 01/06/2023
13+
ms.author: owenrichards
1414
ms.custom: aaddev
1515
ms.reviewer: udayh
1616
#Customer intent: As an application developer, I want to create a trust relationship with a Google Cloud identity so my service in Google Cloud can access Azure AD protected resources without managing secrets.
@@ -209,31 +209,29 @@ class ClientAssertionCredential implements TokenCredential {
209209

210210
let aadAudience = "api://AzureADTokenExchange"
211211
const jwt = axios({
212-
213212
url: "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?audience="
214213
+ aadAudience,
215-
method: "GET",
216-
headers: {
217-
"Metadata-Flavor": "Google"
218-
}}).then(response => {
219-
console.log("AXIOS RESPONSE");
220-
return response.data;
214+
method: "GET",
215+
headers: {
216+
"Metadata-Flavor": "Google"
217+
}}).then(response => {
218+
console.log("AXIOS RESPONSE");
219+
return response.data;
221220
});
222221
return jwt;
223-
224-
.then(function(aadToken) {
225-
// return in form expected by TokenCredential.getToken
226-
let returnToken = {
227-
token: aadToken.accessToken,
228-
expiresOnTimestamp: aadToken.expiresOn.getTime(),
229-
};
230-
return (returnToken);
231-
})
232-
.catch(function(error) {
233-
// error stuff
234-
});
222+
.then(function(aadToken) {
223+
// return in form expected by TokenCredential.getToken
224+
let returnToken = {
225+
token: aadToken.accessToken,
226+
expiresOnTimestamp: aadToken.expiresOn.getTime(),
227+
};
228+
return (returnToken);
229+
})
230+
.catch(function(error) {
231+
// error stuff
232+
});
233+
}
235234
}
236-
}
237235
export default ClientAssertionCredential;
238236
```
239237

0 commit comments

Comments
 (0)