question

RavishankarBoyina-9182 avatar image
0 Votes"
RavishankarBoyina-9182 asked deherman-MSFT answered

What is TokenResource value for Azure Data Box Gateway for AAD Authentication using .Net SDK?

Hi All,

I am trying to access Azure Data Box Gateway using Azure .Net SDK.
I need to generate access token for AAD Auth to ADBG azure resource.
For generating access token I need the value of tokenresource value.

Can anyone guide me what would be token resource value in this case?

I am using IAuthConfigurationProvider interface and AuthTokenProvider class for access token generation.

namespace Microsoft.Manufacturing.Core.Web.HttpAccess.ActiveDirectory
{
public interface IAuthConfigurationProvider
{
string AuthenticationURL { get; }
string ClientCredentialId { get; }
string ClientCredentialSecret { get; }
string TokenResource { get; }
}
}

namespace Microsoft.Manufacturing.Core.Web.HttpAccess.ActiveDirectory
{
public sealed class AuthTokenProvider : IAuthTokenProvider
{
public AuthTokenProvider(IAuthConfigurationProvider configSettings);

     [AsyncStateMachine(typeof(<GetTokenAsync>d__2))]
     public Task<string> GetTokenAsync();
 }

}

Thanks,
Ravi.

azure-data-box-family
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RavishankarBoyina-9182
Can you share what documentation you are following to access Azure Data Box Gateway using Azure .Net SDK? This is not something I have worked on in the past.
I am reaching out to our experts internally to see if they have more information on this.

0 Votes 0 ·
deherman-MSFT avatar image
0 Votes"
deherman-MSFT answered

@RavishankarBoyina-9182
Thanks for providing those additional details. I reached out to the product team and confirmed that AAD is not currently support for Azure Data Box Gateway. This is something that they are planning to implement but unfortunately I cannot provide an ETA currently.



Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RavishankarBoyina-9182 avatar image
0 Votes"
RavishankarBoyina-9182 answered

I couldnt find the documentation using .net sdk but i have below rest api doc. I had figured it out from github azure .net sdk test classes.

https://docs.microsoft.com/en-us/rest/api/databoxedgegateway/shares/refresh

I found the value for TokenResoure => https://management.azure.com/

Now I am able to generate access token but now I am getting authorize error.

Exception : "Does not have authorization to perform action 'Microsoft.DataBoxEdge/dataBoxEdgeDevices/shares/read' over scope"

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.