@@ -38,6 +38,7 @@ public AzureEnvironment(Map<String, String> endpoints) {
3838 put ("activeDirectoryEndpointUrl" , "https://login.microsoftonline.com/" );
3939 put ("activeDirectoryResourceId" , "https://management.core.windows.net/" );
4040 put ("activeDirectoryGraphResourceId" , "https://graph.windows.net/" );
41+ put ("microsoftGraphResourceId" , "https://graph.microsoft.com/" );
4142 put ("dataLakeEndpointResourceId" , "https://datalake.azure.net/" );
4243 put ("activeDirectoryGraphApiVersion" , "2013-04-05" );
4344 put ("storageEndpointSuffix" , ".core.windows.net" );
@@ -62,6 +63,7 @@ public AzureEnvironment(Map<String, String> endpoints) {
6263 put ("activeDirectoryEndpointUrl" , "https://login.chinacloudapi.cn/" );
6364 put ("activeDirectoryResourceId" , "https://management.core.chinacloudapi.cn/" );
6465 put ("activeDirectoryGraphResourceId" , "https://graph.chinacloudapi.cn/" );
66+ put ("microsoftGraphResourceId" , "https://microsoftgraph.chinacloudapi.cn/" );
6567 // TODO: add resource id for the china cloud for datalake once it is defined.
6668 put ("dataLakeEndpointResourceId" , "N/A" );
6769 put ("activeDirectoryGraphApiVersion" , "2013-04-05" );
@@ -89,6 +91,7 @@ public AzureEnvironment(Map<String, String> endpoints) {
8991 put ("activeDirectoryEndpointUrl" , "https://login.microsoftonline.us/" );
9092 put ("activeDirectoryResourceId" , "https://management.core.usgovcloudapi.net/" );
9193 put ("activeDirectoryGraphResourceId" , "https://graph.windows.net/" );
94+ put ("microsoftGraphResourceId" , "https://graph.microsoft.us/" );
9295 // TODO: add resource id for the US government for datalake once it is defined.
9396 put ("dataLakeEndpointResourceId" , "N/A" );
9497 put ("activeDirectoryGraphApiVersion" , "2013-04-05" );
@@ -116,6 +119,7 @@ public AzureEnvironment(Map<String, String> endpoints) {
116119 put ("activeDirectoryEndpointUrl" , "https://login.microsoftonline.de/" );
117120 put ("activeDirectoryResourceId" , "https://management.core.cloudapi.de/" );
118121 put ("activeDirectoryGraphResourceId" , "https://graph.cloudapi.de/" );
122+ put ("microsoftGraphResourceId" , "https://graph.microsoft.de/" );
119123 // TODO: add resource id for the germany cloud for datalake once it is defined.
120124 put ("dataLakeEndpointResourceId" , "N/A" );
121125 put ("activeDirectoryGraphApiVersion" , "2013-04-05" );
@@ -213,6 +217,13 @@ public String getGraphEndpoint() {
213217 return endpoints .get ("activeDirectoryGraphResourceId" );
214218 }
215219
220+ /**
221+ * @return the Microsoft Graph resource ID.
222+ */
223+ public String getMicrosoftGraphEndpoint () {
224+ return endpoints .get ("microsoftGraphResourceId" );
225+ }
226+
216227 /**
217228 * @return the Data Lake resource ID.
218229 */
@@ -294,7 +305,9 @@ public enum Endpoint {
294305 /** Azure Log Analytics endpoint. */
295306 LOG_ANALYTICS ("azureLogAnalyticsResourceId" ),
296307 /** Azure Application Insights. */
297- APPLICATION_INSIGHTS ("azureApplicationInsightsResourceId" );
308+ APPLICATION_INSIGHTS ("azureApplicationInsightsResourceId" ),
309+ /** Microsoft Graph APIs endpoint. */
310+ MICROSOFT_GRAPH ("microsoftGraphResourceId" );
298311
299312 private final String field ;
300313
0 commit comments