Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,12 @@ export const provisionDispatcher = () => {
) => {
try {
TelemetryClient.track('NewPublishingProfileStarted');
const result = await httpClient.post(
`/provision/${projectId}/${type}`,
{ ...config, graphToken: graphToken, currentProfile },
{
headers: { Authorization: `Bearer ${armToken}` },
}
);
const result = await httpClient.post(`/provision/${projectId}/${type}`, {
...config,
graphToken: graphToken,
currentProfile,
accessToken: armToken,
});
// set notification
const notification = createNotification(getProvisionPendingNotification(result.data.message));
addNotificationInternal(callbackHelpers, notification);
Expand Down
4 changes: 1 addition & 3 deletions Composer/packages/server/src/controllers/provision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ export const ProvisionController = {
}
},
provision: async (req: Request, res) => {
const accessToken = req.headers.authorization?.substring('Bearer '.length);
// const graphToken = req.headers.graphtoken;
const user = await ExtensionContext.getUserFromRequest(req);
const type = req.params.type; // type is webapp or functions
const projectId = req.params.projectId;
Expand All @@ -48,7 +46,7 @@ export const ProvisionController = {
// call the method
const result = await pluginMethod.call(
null,
{ ...req.body, accessToken },
{ ...req.body },
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

req.body.accessToken now contains the ARM token

currentProject,
user,
authService.getAccessToken.bind(authService)
Expand Down