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
Copy file name to clipboardExpand all lines: articles/azure-monitor/essentials/metrics-store-custom-rest-api.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ To submit custom metrics to Azure Monitor, the entity that submits the metric ne
47
47
Once you have created your managed identity or service principal and assigned **Monitoring Metrics Publisher** permissions, you can get an authorization token by using the following methods.
48
48
When requesting a token specify `resource: https://monitoring.azure.com`.
49
49
50
-
[!INCLUDE [Get a token](../includes/get-a-token.md)]
50
+
[!INCLUDE [Get a token](../includes/get-authentication-token.md)]
51
51
52
52
Save the access token from the response for use in the following HTTP requests.
Copy file name to clipboardExpand all lines: articles/azure-monitor/essentials/rest-api-walkthrough.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Request submitted using the Azure Monitor API use the Azure Resource Manager aut
22
22
### Retrieve a token
23
23
Once you've created a service principal, retrieve an access token. Specify `resource=https://management.azure.com` in the token request.
24
24
25
-
[!INCLUDE [Get a token](../includes/get-a-token.md)]
25
+
[!INCLUDE [Get a token](../includes/get-authentication-token.md)]
26
26
27
27
28
28
After authenticating and retrieving a token, use the access token in your Azure Monitor API requests by including the header `'Authorization: Bearer <access token>'`
Alternatively, you can use the DefaultAzureCredential class to get a token. This uses the default Azure credentials to authenticate the request and doesn't require a client ID or client secret.
77
+
Alternatively, you can use the DefaultAzureCredential class to get a token. This method uses the default Azure credentials to authenticate the request and doesn't require a client ID or client secret.
77
78
78
79
```csharp
79
80
varcredential=newDefaultAzureCredential();
@@ -102,17 +103,20 @@ For more information, see [DefaultAzureCredential Class](/dotnet/api/azure.ident
102
103
For information on authentication use JavaScript and NodeJS, see [How to authenticate JavaScript apps to Azure services using the Azure SDK for JavaScript](/azure/developer/javascript/sdk/authentication/overview)
103
104
104
105
105
-
The following code shows how to get a token using the DefaultAzureCredential class. This uses the default Azure credentials to authenticate the request and doesn't require a client ID or client secret.
106
+
The following code shows how to get a token using the DefaultAzureCredential class. This method uses the default Azure credentials to authenticate the request and doesn't require a client ID or client secret.
For more information, see [DefaultAzureCredential Class](/javascript/api/@azure/identity/defaultazurecredential?view=azure-node-latest)
114
114
115
-
Alternatively you can use the ClientSecretCredential class to get a token. This requires a client ID and client secret to authenticate the request.
115
+
You can also use the `InteractiveBrowserCredential` class to get the credentials. This method provides a browser-based authentication experience for users to authenticate with Azure services.
116
+
117
+
For more information, see [DefaultAzureCredential Class](/javascript/api/@azure/identity/defaultazurecredential?view=azure-node-latest) and [InteractiveBrowserCredential Class](/javascript/api/@azure/identity/interactivebrowsercredential?view=azure-node-latest)
118
+
119
+
Alternatively you can use the ClientSecretCredential class to get a token. This method requires a client ID and client secret to authenticate the request.
@@ -127,7 +131,7 @@ For more information, see [ClientSecretCredential Class](/javascript/api/@azure/
127
131
128
132
#### Python
129
133
130
-
The following code shows how to get a token using the DefaultAzureCredential class. This uses the default Azure credentials to authenticate the request and doesn't require a client ID or client secret.
134
+
The following code shows how to get a token using the DefaultAzureCredential class. This method uses the default Azure credentials to authenticate the request and doesn't require a client ID or client secret.
For more information, see [DefaultAzureCredential Class](/python/api/azure-identity/azure.identity.defaultazurecredential?view=azure-python)
140
143
141
-
Alternatively you can use the ClientSecretCredential class to get a token. This requires a client ID and client secret to authenticate the request.
144
+
You can also use the `InteractiveBrowserCredential` class to get the credentials. This method provides a browser-based authentication experience for users to authenticate with Azure services.
145
+
146
+
For more information, see [DefaultAzureCredential Class](/python/api/azure-identity/azure.identity.defaultazurecredential?view=azure-python) and [InteractiveBrowserCredential Class](/python/api/azure-identity/azure.identity.interactivebrowsercredential?view=azure-python)
147
+
148
+
Alternatively you can use the ClientSecretCredential class to get a token. This method requires a client ID and client secret to authenticate the request.
0 commit comments