@@ -18,24 +18,24 @@ func (g *GraphAPIHandler) SetBaseDomain() string {
18
18
}
19
19
20
20
// ConstructAPIResourceEndpoint constructs the full URL for a graph API resource endpoint path and logs the URL.
21
- func (g * GraphAPIHandler ) ConstructAPIResourceEndpoint (instanceName string , endpointPath string , log logger.Logger ) string {
21
+ func (g * GraphAPIHandler ) ConstructAPIResourceEndpoint (tenantName string , endpointPath string , log logger.Logger ) string {
22
22
urlBaseDomain := g .SetBaseDomain ()
23
- url := fmt .Sprintf ("https://%s%s%s" , instanceName , urlBaseDomain , endpointPath )
23
+ url := fmt .Sprintf ("https://%s%s%s" , tenantName , urlBaseDomain , endpointPath )
24
24
g .Logger .Debug (fmt .Sprintf ("Constructed %s API resource endpoint URL" , APIName ), zap .String ("URL" , url ))
25
25
return url
26
26
}
27
27
28
28
// ConstructAPIAuthEndpoint constructs the full URL for the Microsoft Graph API authentication endpoint.
29
- // It uses the provided tenant name and endpoint path and logs the constructed URL.
30
- func (g * GraphAPIHandler ) ConstructAPIAuthEndpoint (tenantName string , endpointPath string , log logger.Logger ) string {
29
+ // It uses the provided tenant ID and endpoint path and logs the constructed URL.
30
+ func (g * GraphAPIHandler ) ConstructAPIAuthEndpoint (tenantID string , endpointPath string , log logger.Logger ) string {
31
31
// The base URL for the Microsoft Graph API authentication endpoint.
32
32
const baseURL = "https://login.microsoftonline.com"
33
33
34
- // Construct the full URL by combining the base URL, tenant name , and endpoint path.
35
- url := fmt .Sprintf ("%s/%s%s" , baseURL , tenantName , endpointPath )
34
+ // Construct the full URL by combining the base URL, tenant ID , and endpoint path.
35
+ url := fmt .Sprintf ("%s/%s%s" , baseURL , tenantID , endpointPath )
36
36
37
37
// Log the constructed URL for debugging purposes.
38
- log .Debug (fmt . Sprintf ( "Constructed Microsoft Graph API authentication URL") , zap .String ("URL" , url ))
38
+ log .Debug ("constructed Microsoft Graph API authentication URL" , zap .String ("URL" , url ))
39
39
40
40
return url
41
41
}
0 commit comments